sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABELgrep -Inri "<keyword to search for>" .find . -type f -exec sh -c "echo '{}'; cat {}; echo '\n'" \;find . -maxdepth 1 -type d -exec sh -c "echo {} \`ls {} | wc -l;\`" \;groups <user>groupadd <group>usermod -aG <group> <user>chmod g+s <folder>find <folder> -type d -exec chmod g+s {} +a@A ~ $ ssh-keygen -t rsa
a@A ~ $ ssh b@B mkdir -p .ssh
a@A ~ $ cat ~/.ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
a@A ~ $ ssh b@Bps -a | grep <program to kill>
kill 9 <ID of program to kill>du -chs */usr/bin/time -v <running instruction>tar -czf myTar.tar.gz <files>
tar -xf myTar.tar.gzAdd -v for verbose output.
who -u
kill "pid"apt-cache pkgnames <packageName>dpkg -L <packageName>lld <library/executable>git fetch origin
git reset --hard origin/mastergit reset --hardgit fetch origin
git show origin mastergit add fileName
git stash --keep-indexgit log --decorate --graph -p -- fileName
git blame fileNamegit clean -fdgit commit --cleanup=whitespaceAnd, you have to manually remove every "comment" line starting with #
git diff <oldHash> <newHash> --stat
git diff <oldHash> <newHash> -- fileNameIn order to keep only the added changes do
git stash --keep-indexgit diff --color-words -U9999999git fetch -pgit update-index --assume-unchanged <file>
git update-index --no-assume-unchanged <file>:%s/\s\+$<c>-R 0:Ex
:Sexq:
q/:grep -rI "<text>" .
:cw:diffg RE/BA/LO[c ]c
move-window -t <nb>
tmux attach -d
Show and hide hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles TRUE
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder