Wednesday, February 25, 2009

Use rSync to strip hidden files

Recently I was working on a project where I had some GIT repository files and also Apple HFS+ Extended attributes. I struggled for what seemed hours trying to figure out how to remove all of the .DS_File and .git. I remembered that there was rsync which I could use to EXCLUDE files. Now I am sure this could have been much cleaner and I am sure I will repost another in the futre but here are my command for. Remember to look at the files using the:
ls -la
Look for any of the files that begin with "." and here are the commands I used.
rsync -r --exclude '._*' source_folder/ destination_folder/
I was in the folder already which had the source and folder hence the lacking of the "/" before the source and destination.

Here is another script:
rsync -r --exclude '.git*' source_folder/ destination_folder/

No comments:

Post a Comment

Raspberry Pi Zero W - Wireless Configuation

create the file under "boot" folder wpa_supplicant.conf country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev u...