Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

cp -Rp ~/foo /Volumes/KINGSTON

or

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
add comment

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

Questions on Server Fault are expected to relate to professional 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.

1 Answer

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... –  Jian Lin 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 –  Jian Lin May 27 '12 at 5:07
add comment

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