r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

Best. News. Evah!

r3dux | June 27, 2009

Shetboy gets all the achievements that matter to head down under and be my best man! Hurray!!

AU-Achievements

Can’t wait! =D

Comments
3 Comments »
Categories
Life
Comments rss Comments rss
Trackback Trackback

How To: Compress Each Folder/Directory to Separate Archives in Linux

r3dux |

Lets say you’ve got a bunch of folders taking up a large swathe of space which you never really use but want to keep, just not taking up stacks of your NAS… How can you easily compress them all up to individual archives of each folder? Dead easy:

1
2
3
4
5
#!/bin/bash
for folder in */
do
  7z a -mx9 -mmt "${folder%/}.7z" "$folder"
done

Save that to a file, chmod +x it and run in the location you want to compress the folders. Every folder (and all contents within) will be compressed to its own foldername.7z archive.

With 7z, -mx9 is the flag for maximum compression, and -mmt says to use multiple CPUs to speed up compression, so omit that part if you’re on a single core machine.

Comments
4 Comments »
Categories
How-To, Linux
Tags
7z, Compress, Compression, Directory, Folder, How-To
Comments rss Comments rss
Trackback Trackback

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Error Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Problem PS3 Remix Retro script Slides Sound Systems Texture Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“Monday is an awful way to spend 1/7th of your life.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox