Getting Around Flashcards
cd
Change to another directory
ls
List out the contents of the current directory
./
Short for “here”
../
Short for “the folder right above here”
~/
Short for home folder of the currently logged in user
mv
Move a file from one place or another:
mv ~ /my_text.txt ~/Documents/
mv ~ /my_text.txt ~/my_doc.txt
cp
Copy a file or folder from one place to another.
cp ./my_text.txt ~/Documents/
Now there are two copies of my_text.txt. One in the home folder, and one in ~/Documents/
rm
Remove a file or folder.
rm ~/my_text
With great power comes great responsibility.
ln
Create a shortcut to a file or folder.
|
Pipe allows you to chain commands together
command 1 | command 2
Here command does something, and when it is finished, like an assembly line, it passes the completed work to the second line for further processing.
ls - a | grep.git
Search for all files and then filter them for files matching the .git pattern.