Skip to content

Instantly share code, notes, and snippets.

@normoes
Last active March 1, 2018 11:43
Show Gist options
  • Save normoes/e16790078caf8f8be7be06c4c0abc68d to your computer and use it in GitHub Desktop.
Save normoes/e16790078caf8f8be7be06c4c0abc68d to your computer and use it in GitHub Desktop.

hidden files

create an archive using tar (including hidden files)

taken from Digitesters

Normally:

tar czf backup.tar.gz /backup/*

This way all files are tarred except the hidden files.

Solution: replace the asterisk (*) by a dot (.)

tar czf backup.tar.gz /backup/.

copy files (including hidden files)

taken form superuser.com

Solution again use a dot (.) instead of an asterisk (*)

cp -r /backup/. /data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment