Back up a directory
Here’s the one-liner for backing up a directory, named as the directory name plus the date and time when the backup is done. tar czf ~/backups/dir-backup-$(date +'%Y%m%d_%H%M%S').tar.gz ~/dir/*
Here’s the one-liner for backing up a directory, named as the directory name plus the date and time when the backup is done. tar czf ~/backups/dir-backup-$(date +'%Y%m%d_%H%M%S').tar.gz ~/dir/*
Oneline: mkdir -p {a..z}; for i in ./*; do export FILE=$(basename "$i"); export LTR=$(echo "${FILE:0:1}" | tr A-Z a-z); mv "$i" "$LTR/$FILE" ; done Process: mkdir -p {a..z} for i in ./* do export FILE=$(basename "$i") export LTR=$(echo "${FILE:0:1}" | tr A-Z a-z) mv "$i" "$LTR/$FILE" done
Here is a simple oneliner pommodoro timer: echo "aplay ring.wav" | at now + 25 min