Links
Navigating The File System
pwd |
print working directory – outputs the name of the current working directory |
ls |
lists all files and directories in the working directory |
ls -a |
lists all contents, including hidden files and directories |
ls -l |
lists all contents of a directory in long format |
ls -t |
order files and directories by the time they were last modified |
ls -alt |
(example of using 3 options at once) lists all contents, including hidden files and directories, in long format, ordered by the date and time they were last modified |
cd |
change directory – switches you into the directory you specify eg. cd ben/docs/ |
cd .. |
move up one directory |
cd ../ .. |
move up two directories |
mkdir |
make directory – creates a new directory in the working directory eg. mkdir docs |
touch |
creates a new file inside the working directory eg. touch readme.txt or touch docs/readme.txt |
cp frida.txt lincoln.txt |
copy the contents of frida.txt into lincoln.txt |
cp biopic/ray.txt biopic/notorious.txt historical/ |
copy the files biopic/ray.txt and biopic/notorious.txt into the historical/ directory |
Keyboard Shortcuts
up and down arrow keys | allows you to go through all the previous commands |
tab key | helps you autocomplete commands and names |