column -s, -t <fileName.csv>Or, from Vim
:read !column -s, -t <fileName.csv>All users:
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABELCurrent user (FSTYPE and LABEL available only with sudo):
lsblk -o NAME,SIZE,MOUNTPOINTudisks --mount <deviceName>or
udisksctl mount -b <deviceName>
grep -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;\`" \;or, better
ls -d */ | while read dir; do
echo "$dir: $(ls $dir | wc -l)"
donegroups <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 *df -h <path>/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 -dfIf the repo has sumbodules, then
git submodule foreach git clean -dfgit 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>git log --follow <fileName>:%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