-
Notifications
You must be signed in to change notification settings - Fork 1
common
Commands and process that I search every once in a while
if [ $(ps ax | grep [s]sh-agent | wc -l) -gt 0 ] ; then
echo "ssh-agent is already running"
else
eval $(ssh-agent -s)
if [ "$(ssh-add -l)" == "The agent has no identities." ] ; then
echo "add you key to ssh-agent";
fi
fi
Credits: SO
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
Credits: Github
Apparently, tar adds symlink-files as symlinks (which is really nice), to archive the file itself use -h
.
Credits: SO
WIP: not test
tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz
Credits: SE
WIP: nice explanation here
The simplest instantiation, but not the best transfer performance
rsync -a --progress /source/a/ /dest/a
in case you don't wanna preserve ownerships (users, etc.)
rsync -rlptD --progress /source/a/ /dest/a
Apparently, exFAT drives are picky. Hopefully, there are workarounds:
rsync -rltD --progress /source/a/ /dest/a
Check this from details
Thanks: Bhautik Joshi
Split large files in chunks of ~5G.
split -b 5G big-filename big-filename.part
To recover the original file just do:
cat big-filename.part* > big-filename
Credits: tecmint
md5sum in Linux
md5 in osx
WIP: move them from gist to here.