Skip to content

Tiny Bash script to compress all subfolders from root, suitable for massive migration

License

Notifications You must be signed in to change notification settings

lmaster1972/merlins-bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

merlins-bag

This tiny project holds a fairly simple Bash script that I have found useful once I had to move a fairly complex forest of subfolders from an old storage to a newer one. In principle, the fact of transferring files from a source to one or multiple destinations impies that each file is controlled and this produces a lot of slowdowns even when the file is zero-length. The fact of grouping them in a single compressed file may be useful but may take ages to be transferred and most likely validation may easily be faked. So, the most reasonable solution is to compress each subfolder within a compressed archive and then proceed with upload.

The only mandatory tool is tar or any compressor equivalent like zip or 7z.

P.S. It stores root folder files within 'root.tar.gz' archive

Credits

https://superuser.com/questions/1125785/how-to-compress-all-subfolders-to-separate-files-in-bash https://deparkes.co.uk/2015/06/05/find-and-compress-files-in-linux/

About

Tiny Bash script to compress all subfolders from root, suitable for massive migration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages