Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'One way to replace a broken Desktop folder' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
One way to replace a broken Desktop folder
Authored by: nicholfd on Tue, Oct 9 2007 at 9:37AM PDT
$ sudo cp -R /Users/test/Desktop /Users/myuser/Desktop
$ sudo chown -R myuser /Users/myuser

The above commands delete no files. I suspect, it also does not achieve what you think.....

The first command above will place a copy of "/Users/test/Desktop", INSIDE of "/Users/myuser/Desktop/". It will be called "/Users/myuser/Desktop/Desktop"

I suspect you did, or meant to do a:
'sudo cp -R /Users/test/Desktop /Users/myuser/'

This still would not delete any files, but would duplicate the CONTENTS of "/Users/test/Destkop/" inside of "/Users/myuser/Desktop/". Again, anything inside of "/Users/myuser/Desktop/" WOULD NOT BE TOUCHED, unless a file or directory existed with the same name as a file or directory from "/Users/test/Desktop/".

Clear as mud? The above subtitles are very important when working from the command line.

[ Reply to This | # ]