Unix Commands Flashcards
pwd
print working directory
hostname
my computer’s network name
mkdir
make directory [-p create intermediaries, -v verbose list created]
cd
change directory [no args home dir, ~ home dir]
ls
list directory [-a list all, -l long / detail format, -R recurse subdir]
rmdir
remove directory
pushd
push directory (save where I am, then go here)
popd
pop directory (return to saved dir)
touch
update mod and access time, or create new empty file
cp
copy a file or directory [-i prompt on overwrite, -n do not overwrite, -R copy subdirs]
mv
rename a file, move a file or directory [-i prompt on overwrite, -n do not overwrite]
rm
remove a file or directory [-r recursively remove files and dir]
more
scroll through a file
less
page through a file, backwards too
cat
stream file(s) to stdout [-n number the lines]
pipe (|)
output of one command to input of following command
redirect out (>)
write output of a command to a file
redirect in (<)
use file as input for a command
append output (»)
appends output of command to the file
xargs
collect/execute arguments, for other command
find
find files [provide start path, -name filename”]
grep
find things inside files [-i ignore case, -r recurse subdirs (may not work)]
man
rtfm - read a manual page
apropos
find what man page is appropriate
whatis
brief description of command
env
look at your environment
echo
write argument(s) to stdout
export
set a new environment variable