Skip to content

Instantly share code, notes, and snippets.

@ismet55555
Last active November 10, 2020 13:55
Show Gist options
  • Save ismet55555/2c68b328709ace51ede596c2732856f0 to your computer and use it in GitHub Desktop.
Save ismet55555/2c68b328709ace51ede596c2732856f0 to your computer and use it in GitHub Desktop.
A command to compress the linux home directory
# This command compresses your home directory
sudo tar -cpf home_dir_backup.tar /home/$USER \
--exclude-caches-all \
--exclude-backups \
--exclude=home_dir_backup.tar \
--exclude=.cache \
--exclude=.config \
--exclude=.debug \
--exclude=.dbus \
--exclude=.gvfs \
--exclude=.local/share/gvfs-metadata \
--exclude=.local/share/Trash \
--exclude=.recently-used \
--exclude=.thumbnails \
--exclude=.xsession-errors \
--exclude=.Trash \
--exclude=.steam \
--exclude=Public \
--exclude=Steam \
--exclude=Templates \
--exclude="VirtualBox VMs" \
--warning=no-file-changed .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment