Zip Files – 4GB Limit?

It appears that originally, Zip files had a 4GB limit, and the software that is part of the Mac OS is only able to open files under this size

If you have zip archives over 4GB then you will need software capable of extracting this, thankfully there is The Unarchiver, a free app from http://wakaba.c3.cx/s/apps/unarchiver.html

Download and install the App into Applications by dragging it there

For ease of use I will put the icon in the dock, then you can just drag a zip archive to the icon to begin extraction

Command Line File & Folder Manipulation

 

This time I will run through a few of the useful tasks that can be accomplished via the command line regarding file and folder manipulation

cp

used to copy a file or folder, some examples of usage are below

cp donkey.txt monkey.txt

this will copy a file called donkey.txt and call the copy monkey.txt within the same directory

cp donkey.txt ~/Documents

will copy donkey.txt from the current directory to your Documents folder, it will still be called donkey.txt

cp donkey.txt ~/Documents/monkey.txt

will copy donkey.txt from your current folder to your Documents folder and name it monkey.txt

cp *.jpg ~/Pictures

this will copy all of your jpegs from your current folder to your Pictures folder

cp -R Documents Documents_Backup

this will copy the whole Documents folder to another folder called Documents_Backup, to do this you will need to be in your home folder, so you would type cd ~/ before trying to run this command

ditto

ditto is used to copy a directory, but with the added benefit of preserving a lot of the security information, such as file ownership, see usage examples below

ditto Documents Documents_Backup

this will copy the contents of your Documents folder into a folder called Documents_Backup, if you already have a folder called Documents_Backup then it will merge the contents of Documents with those in Documents_Backup

ditto -rsrcFork Documents Documents_Backup

almost exactly the same as above, but with the added support for Mac specific characteristics  such as resource forks

mv

mv is used for moving files, be careful when using this, as you can overwrite files using this, with no chance of recovering the overwritten files

mv  donkey.txt monkey.txt

the command above will rename the file named donkey.txt in your current directory to monkey.txt

mv donkey.txt ~/Documents

moves the file named donkey.txt from your current folder to your Documents folder

mv donkey.txt ~/Documents/monkey.txt

moves the file named donkey.txt from your current folder to your Documents folder, but this time it renames it monkey.txt, if there is already a monkey.txt in that location then it will be overwritten

mv *.jpg ~/Pictures

moves all your jpegs from your current folder to your Pictures folder

rm

Used to delete files or folders, examples of usage below

rm donkey.txt

deletes the file named donkey.txt

rm donkey.*

deletes all files with the name donkey, regardless of their suffix

rm donkey*.*

deletes all files with donkey in the filename, for example, donkeyride.jpg, donkeykong.mov, donkeysdancing.ppt, etc.

rm *.txt

deletes all the files with the .txt suffix

rm -R data

deletes the folder called data and all of its contents

rmdir

used to remove a directory as shown below

rmdir test

will delete a folder called test providing the folder is empty

rmdir -R test

will delete a folder called test, regardless of whether it has any files or folders within it

mkdir

you would use this to create a directory as shown below

mkdir test

this would create a directory named test in the current folder

chmod

commonly used to change permissions on folders or files, to add, remove or specify access for users & groups, examples of usage are shown below

chmod u+w donkey.txt

allows the user write access to the file donkey.txt

chmod u-r donkey.txt

removes the users read access on the file donkey.txt

chmod ug+x donkey.txt

gives user and group execute rights to donkey.txt

chmod o=rw donkey.txt

gives others read and write access to donkey.txt, but disallows execute access

chown

commonly used to change the owner of a file or folder, must be run as root, as shown below

sudo chown dave donkey.txt

changes the owner of donkey.txt to dave

sudo chown dave data

changes the owner of the data folder to dave

sudo chown -R dave data

gives dave ownership of the folder named data, along with all of the files and folders within it