i know
killall
terminate a program, not the best so you can checkbpytop
touch
create a file, modify the access time of a filewhich
where a program isping
test networkless <file>
orcat <file> | more
better than cat when creating long filessudo blkid
list all the devices on a machine, find the uuid for a devicesudo -s
act as a root for some time instead of typing sudo every timesu <user>
change usersudo
allows us to act as the root user
Piping / chaining
ls | cat
allowing the standard output from the ls
command to be the standard input for the cat
command
e.g: cat contacts.txt | sort | uniq | grep something
running multiple commands at once
- using
;
run both commands - using
&&
run the second command if the first succeeds - using
||
run the second command if the first fails
e.g: mkdir hi && cd hi
the find command
find <locationToSearch>
redirection
Redirecting the output into a file
echo hi > hi.txt
overwrite redirection
echo hi >> hi.txt
append redirection
e.g: sort < contacts.txt > sorted-contacts.txt
sudo
sudo !!
Run sudo
to the previous command