Tag Archives: Mac Linux

Get 2GB Free Online Storage from Dropbox

2GB Free Online Storage with Dropbox
2GB Free Online Storage with Dropbox

Today I’ll be writing about some easy ways to get free online storage. I’m starting with Dropbox because it was the first one I started using and I love it!

Dropbox offers 2GB of free online storage, and if you use this link to sign up, you will get a bonus 250 MB of storage! That’s 2.25 GB of free online storage!

What’s better than that? You can access your dropbox from any computer or mobile device! You can login via the webpage, or you can download an app specific to your computer/device!

It works on Windows, Mac, Linux, iPhone, Droid, and more!

It is super easy to setup and use, and it syncs automatically, so you always have the latest version!

They also have a time machine like feature that will let you go back and get an older version of a document or undelete something that got deleted (perhaps by mistake? lol).

Go ahead, give it a try! http://db.tt/Rggu5hT

Batch Zip and Rename – I love the Terminal!

Today I needed to compress numerous (around 25) directories into individual archives (in this case, zip’s) and then rename them with a different extension (in this case ‘cbz’). This would have been extremely painful to do manually… I mean, right click a directory — one at a time — then left click “compress” (or zip, depending on the context menu)… and I’m not even going to go into renaming (there are at least 3 ways to manually rename a file, and I don’t want to describe them now. If you care to know just ask).

So what did I do? Did I really bother with all of that nonsense?! NO WAY! I have no patience for that!

Here’s the easy way:

1.) First, open your terminal (sorry, this is for Mac and Linux machines only, I don’t have time to convert the code to work on Windows).

2.) Next, navigate to the directory your files are in.

3.) Finally, run this command:


for dir in `ls`; do zip $dir $dir/*; mv $dir*zip $dir.cbz; done

And it’s as simple as that! All done in one easy process, just a few lines of code!

If you just want to do a batch zip, without the rename, use this code instead:


for dir in `ls`; do zip $dir $dir/*; done

I hope that helps someone out there…

Update

Here are a few different methods to try for batch-zipping in Linux:


## zip all files and folders in current directory
zip -r "${PWD##*/}.zip" *

## zip the contents of each folder from the current directory into an archive
for x in *; do if [ -d "$x" ]; then cd "$x"; zip -r "../$x.zip" *; cd ..; fi; done

## zip each folder into an archive
for x in *; do if [ -d "$x" ]; then zip -r "$x.zip" "$x"; fi; done

## another way to batch-zip
for i in $(find ./ -type d -maxdepth 1);do zip -r9 $i.zip $i; done

## same as above only using tar instead of zip
for i in $(find ./ -type d -maxdepth 1);do tar -czvf $i.tgz $i; done