Fli
05-30-2015, 04:56 PM
What are ways to archive one folder subfolders so each subfolder is in its own separate tar / tgz archive?
here is one way:
go to directory with subdirectories
# cd /path/to/directory
# find subdirectories in current directory (no subdirectories) and archive them
find . -maxdepth 0 -type d -exec tar czf {}.tgz {} \;
here is one way:
go to directory with subdirectories
# cd /path/to/directory
# find subdirectories in current directory (no subdirectories) and archive them
find . -maxdepth 0 -type d -exec tar czf {}.tgz {} \;