Function & Symbol Flashcards
Print Working Directory
pwd
[Thes-Macbook-Pro:~ Main$ pwd
My Computer’s Network Name
hostname
[Thes-MacBook-Pro:~ hostname
Make Directory
mkdir
Thes-MacBook-Pro:~ mkdir foldername
If you want to setup a folder within the current directoryr:
Thes-MacBook-Pro:~ mkdir foldername/filename
If you want to setup a complete path through folders:
Thes-MacBook-Pro:~ mkdir foldername/filename/2ndfilename/3rdfilename
Change Directory
cd
Thes-MacBook-Pro:~ cd foldername Thes-MacBook-Pro:~ pwd Thes-MacBook-Pro:~ foldername Thes-MacBook-Pro:~ cd filename Thes-MacBook-Pro:~ pwd Thes-MacBook-Pro:~ foldername/filename To back out of a path: Thes-MacBook-Pro:~ cd ../..
Will take you to desired directory and path. When backing out of a path each ‘../’ will back you out by one and you can use more than one set at a time.
List Directory
ls
Thes-MacBook-Pro:~ ls
Lists all the contents in your current directory.
Remove Directory
rmdir
Thes-MacBook-Pro:~ rmdir 2ndfilename
Will remove the directories and folders you want.
Push Directory
pushd
Thes-MacBook-Pro:~ pushd
Pop Directory
popd
Thes-MacBook-Pro:~ popd
Copy a File or Directory
cp
Move a File or Directory
mv
Page Through a File
less
Print The Whole File
cat
Execute Arguments
xargs
Find Files
find
Find Things Inside Files
grep