7.2 Summary of Commands
Author: Dr. Alejandra Rougon
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
The following table shows a summary of the commands reviewed in the previous notebooks
Command | Action |
---|---|
pwd |
print path to working directory |
ls |
list directory contents [ -l long description, -a all, -t time order, -r reverse, -p prints / after folder name] |
cd |
change directory |
mkdir |
make directory |
cat |
view, create, add content & concatenate files |
less |
view file contents |
more |
view file contents |
head |
view top lines [-n number of lines] |
tail |
view bottom lines [-n number of lines] |
man |
open manual of a specific command [q to quit] |
cp |
copy files & folders |
mv |
move files & folders; change name |
rm |
remove files |
rmdir |
remove directories |
* |
wildcard [any character any number of times] |
sort |
sort [alphabetically, -n numerically, -v numerically letters and numbers, -r reverse] |
cut |
select columns [-f field, -d separator] |
grep |
find string [-v opposite, -c count] |
vim |
text editor [ i insert, Esc:wq! save and quit, Esc:q! quit without saving] |
nano |
text editor [ Ctrl o save, Ctrl x quit] |
wc |
word count [-l lines, -w words, -c characters] |
chmod |
change permissions |
| |
pipe [output of one command goes as an input to another command] |
> |
output redirection [new file or overwrite existing file] |
>> |
output redirection append |
ssh |
secure shell to access a remote server |
scp |
secure copy files between local and remote server |
echo |
prints to screen |