-
check disk space:
df -H
-
transfer file from server to local:
scp [email protected]:foobar.txt /local/dir
-
local to server:
rsync -avz -e 'ssh' foobar.txt [email protected]:somewhere
-
find file and remove:
find . -maxdepth 1 -regex './[a-z0-9]*' | xargs rm -rf
find the folderfind . -type f
-maxdepth 1 means non-recursive
xargs
is the command that "converts" its standard input into arguments of another program, or, as they more accurately put it on the man page\ -
count word, line:
wc -l -w [file]
-
output the head or tail:
head/tail -n [number-of-line] [file]
-
execute a command in the bg:
[command] &
also hide the stdout:[command] > /dev/null &
Last active
July 2, 2019 17:06
-
-
Save zlin888/43a713b8eee631e33c46bef7e3a8c4c3 to your computer and use it in GitHub Desktop.
ubuntu cheatsheet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment