Documente Academic
Documente Profesional
Documente Cultură
File
Commands
Process
Management
cat –
concatenates
and
displays
files at/batch–
execute
commands
at
a
later
time
cat > file –
places
standard
input
into
file bg –
lists
stopped
or
background
jobs;
resume
a
cd –
change
current
directory stopped
job
in
the
background
cmp –
compares
two
files cron –
clock
daemon
that
executes
commands
at
cp –
copies
a
file
or
a
directory specified
dates
and
times
cut –
removes
columns
or
fields
from
the
specified
crontab –
modifies
the
user's
crontab
file,
which
is
file(s) used
by
cron
diff –
displays
line‐by‐line
differences
between
two
fg –
brings
the
specified
job
to
foreground
text
files kill pid –
kill
process
id pid
head –
displays
the
first
lines
of
the
specified
file(s) killall proc –
kill
all
processes
named
proc1
join –
joins
two
files nice –
invoke
a
command
with
an
altered
scheduling
jot –
print
sequential
or
random
data priority
ln –
make
hard
or
symbolic
links
to
files ps –
display
your
currently
active
processes
ls -al –
formatted
listing
with
hidden
files renice –
alter
priority
of
running
processes
ls –
directory
listing top –
display
all
running
processes
mkdir dir –
create
a
directory dir
more/less –
output
the
contents
of
the
specified
File
&
Group
Permissions
file(s)
in
pages chmod octal file –
change
the
permissions
of
mv –
rename
or
move
a
file file
to
octal,
which
can
be
found
separately
for
nl –
put
line
numbers
on
a
file user,
group,
and
world
by
adding:
od –
sequentially
copies
each
file
to
standard
output,
•
4
–
read
(r)
displaying
it
according
to
the
specified
arguments;
for
•
2
–
write
(w)
example,
in
hexadecimal
(often
useful
in
conjunction
•
1
–
execute
(x)
with
diff) Examples:
paste –
merge
same
lines
of
several
files
or
chmod 777 –
read,
write,
execute
for
all
subsequent
lines
of
one
file
chmod 755
–
rwx
for
owner,
rx
for
group
and
world
pr –
produces
a
printed
listing
of
one
or
more
files
For
more
options,
see man chmod.
suitable
for
printing chgrp –
change
the
group‐ID
of
the
specified
files
or
pwd –
print
current
working
directory directories
rm –
remove
the
specified
file(s);
using
the
-rf
flag
groups –
show
group
memberships
allows
a
directory
to
be
removed1
Searching
sort –
sort,
merge
or
sequence
check
text
files
grep –
search
for
a
pattern
in
the
specified
files
split –
split
a
file
into
pieces
command | grep pattern
–
search
for
pattern
tail –
displays
the
last
lines
of
the
specified
file(s)
in
the
output
of
command
tail -f file –
output
the
contents
of
file
as
it
find file –
find
all
instances
of
file (UNIX)
grows,
starting
with
the
last
10
lines
locate file –
find
all
instances
of
file
touch –
change
file
access
and
modification
times;
xargs ‐
construct
argument
lists
and
invoke
utility
can
be
used
to
create
a
new
0‐byte
(empty)
file
tr –
translate
characters
from
one
string
to
another Compression
uniq –
report
or
filter
out
repeated
lines
in
a
file You
can
find
a
number
of
compression
and
wc –
display
a
count
of
lines,
words
and
characters
in
decompression
utilities.
Check
the
man
pages
for
tar,
a
file compress/uncompress,
gzip/gunzip
and
zip/unzip.
Others
are
also
available.
SSH
&
Secure
File
Copying
scp –
copies
files
between
hosts
on
a
network
tar cf file.tar files –
create
a
tar
named
sftp –
an
interactive
file
transfer
program
file.tar
containing
files
ssh user@host –
connect
to host
as
user
tar xf file.tar –
extract
the
files
from
ssh-copy-id user@host –
add
your
key
to
file.tar
host
for
user
to
enable
a
keyed
or
passwordless
gzip file –
compresses
file
and
renames
it
to
login file.gz
gunzip file.gz –
decompresses file.gz
back
to
file
1
Use with extreme caution!
UNIX/LINUX
Command
Reference
Sheet