Search This Blog

Friday, 13 May 2011

Compress all files in a directory



This is a really great terminal command that compresses every file within a directory. Here are two variants of it; one that removes the original source file and leaves only the compressed files, and another command that leaves the uncompressed source files intact.

Compress all files in a directory, remove source files


This version compresses all items in the current directory and then removes the original source uncompressed file:

for item in *; do zip -m '${item}.zip' '${item}'; done

Remember the * signifies all files in the current directory, so be sure you are in the directory you want to compress before executing the command. You can always double-check what directory you are working in with the ‘pwd’ command too.

If you have a largely infrequently accessed downloads or other archives folder, this command can really conserve disk space. Obviously since it compresses the files, it wouldn’t make sense to use it in a directory where things are regularly accessed.

Compress all files in a directory, maintain original files


You can also use the above command to compress all of the files within a directory, but still maintain the original files or folders as uncompressed. The command is practically identical, just leave out the -m flag:

for item in *; do zip '${item}.zip' '${item}'; done

You will now have compressed all files in the present working directory (pwd) and the original source files will remain in place uncompressed as well.

These command work in Mac OS X and Linux, and likely other Unix variants as well.

Drag & Launch Apps from Finder Window Sidebars



Drag Apps to Finder Window Sidebar

Just like you can drag your own folders into the sidebar, you can also drags apps into Finder window sidebars for quick access.

Once apps are in the sidebar, if you click on them they will launch, which makes desktop windows serve a dual purpose as both file manager and a quick application launcher.

What’s wrong here?



I Don’t Belong Here



I Don't Belong Here






Source: Taylor Holland Submitted by: Unknown




So was Thom Yorke’s solo album really a solo album if there were five of him?



Yes, Mr. Yorke is cloned in the first pic, but here is the original (Thanks Murdock!) ..

photobomb that guy - I Don't Belong Here



"

Quack!



Hmmm.



Hmmmm.