Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is on Mac OS X Lion, and I use the following to back up a project folder

cp -Rp ~/foo /Volumes/KINGSTON


cp -a ~/foo /Volumes/KINGSTON

The -p or -a is so that the timestamps of the files are preserved. (KINGSTON is the USB flash drive, and Get Info says I have permission to read and write on this device).

But it will give many errors such as:

cp: chflags: /Volumes/KINGSTON/Proj/Proj/Color.h: Invalid argument

Can this be fixed? thanks.

share|improve this question

closed as off topic by Ward, Iain May 27 '12 at 7:47

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

What filesystem is your KINGSTON formatted to? If it is FAT32, I would guess the file you have mentioned have some attributes which cannot be set on a file in the FAT32 filesystem. In that case, if all you want to preserve is the timestamp, you may:

  1. Switch to use some other command for backup, such as rsync
  2. Reformat your KINGSTON flash drive to HFS+
  3. Remove the special attributes on that file, and hope it won't happen in the future
share|improve this answer
good guess... in fact it happens on the external hard drive using FAT32 as well... – 太極者無極而生 May 27 '12 at 4:59
So after I formatted it to Mac OS Extended (Case Sensitive), the error went away... If it is formatted to ExFAT, the error will still be there – 太極者無極而生 May 27 '12 at 5:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.