Shell Commands Flashcards
pwd
print working directory
hostname
my computer’s network name
mkdir
mkdir “name with space”
mkdir -p stuff/things/orange/apple/pear/grape/
make directory
cd
cd ..
cd ../../../
change directory
ls
ls -a
list directory
list directory with invisible files
rmdir
rm -rf (to remove directory that is not empty)
remove directory
pushd
push directory (takes your current directory and "pushes" it into a list for later, then it changes to another directory. It's like saying, "Save where I am, then go here.") (swaps directories is donw without named directory)
popd
pop directory
takes the last directory you pushed and “pops” it off, taking you back there.
cp
cp -r to copy more directories with files in them.
copy file or directory
will overwrite so be careful
mv
rename a file or directory
less
page through a file
q to quit; space and w to page thru, or arrow keys
cat
print the whole file
xargs
execute arguments
find
find files
grep
find things inside files