Why So Scared

A blog about; Programming, Music and Random Stuff

Terminal Command Mac Create RAR Archives

If you want to pack your files into RAR’s then use this simple Terminal command

rar a -v100000 MySplitRarArchive

rar a -v100000 MySplitRarArchive

where -vxx is the file size of each of the RAR files in kb’s

posted by Juo in tidbit and have No Comments

Batch Rename Suffixes or Prefixes Terminal

Someone on a forum I regular asked how to batch rename suffixes within the terminal.

So The filenames;
filename.rar
filename2.rar
filename3.rar

Could have a suffix added like this;
filename_[sitename].rar
filename2_[sitename].rar
filename3_[sitename].rar

Suffix

for i in *.rar; do mv “$i” “`basename $i .rar`_[sitename].rar”; done

Prefix

find *.rar -exec mv {} [sitename]_{} \;

posted by Juo in tidbit and have No Comments