Sign in to save your progress, vote, and build your own decks.Sign in
Unix commands
60 cards·by lucrussell
unixcomputing
cat f
List contents of file
cat f1 f2 >f3
Concatenates f1(file 1) & f2(file 2) into f3(file 3)
chmod ###
changes your protections. The order is: you|group|universe (rwxrwxrwx).
clear
to clear screen
compress
compresses the file filename and puts a .Z extension on it. To uncompress it
cp f1 f2
Copy file f1 into f2
cp -r D1D2
copies the directory D1 and renames it D2
^-c (ctrl-c)
to kill a running process
^-d (ctrl-d)
to close an open window
df
gives disk usage
diff f1 f2
Lists file differences
dig host
domain name
du
lists all subdirectories and their sizes and total directory size
du -a
lists all files and their sizes in present directory and total directory size
du -s
lists overall directory size
env
shows current environment set-up
find
./ -name t*" -print"
ftp
establishes an ftp link with machinename
gzip
produces files with a .gz extension.
gunzip
decompress files created by gzip
ispell f
Interactively checks the spelling of the file f
kill -9 process-id#
kills a running process
ls
shows listing of files in present directory
man command
shows help on a specific command.
mkdir D
creates a new directory called D
more
to view the contents of a file without making changes to it one screen at a time
mv f1 f2
Rename file f1 as f2
mv f1D
moves the file called f1 to the directory D
nslookup host
domain name, IP address, and alias information for the given host.
passwd
to change your password
pwd
present working directory
ps
Shows processes running
ps -flu
Shows detailed description of processes running
quota -v
Shows current disk usage and limits.
rlogin
allows you to remotely log in to another machine on which you have access privileges
rm f
Delete (removes) the file f.
rm -i f
To be prompted for confirmation before you remove a file f
rmdir D
Delete (removes) the empty directory D
rm -r D
removes the directory named D and its contents - use with caution
s f
Alphabetically sort f.
talk
establishes an e-talk session with user@machinename
tar
combines multiple files into one or vice-versa
telnet
allows you to remotely log in to another machine on which you have access privileges
uncompress
uncompresses filename
users
shows who's logged in on the machine
vi
to open the file called filename in the vi text editor
who
Shows who is currently logged on the system.
whoami
shows username of person logged in that window
whois domain_name
lists the domain registration record
*
wild card character representing any # or characters
date
shows the time and date
date -u
shows greenwich mean time
.
a short cut that stands for the location you are at in a pathway
..
move to parent directory from any comand
?
wild card character representing one character
~
abbreviation for the home dir
grep
grep -i something *
recursive grep
grep -ir something *
grep history
history | grep -i
processes listening on ports
lsof -Pnl +M -i4