Current Position:Home > Cp: No such file or directory

Cp: No such file or directory

Update:11-30Source: network consolidation
As the title suggest, I'm having a problem with cp.
As the matter of fact, is inside the preferences folder but why "No such file or directory"?
The-Universe:~ LS$ cp
cp: No such file or directory
I learnt this command-line form the "Mac OS X Server Introduction to Command-Line Administration Version 10.6 Snow Leopard", pg 38.

The Best Answer

I would suggest having a backup of your whole disk, and particularly of any critical files, before proceeding here.
The the documentation is assuming that you're defaulted into the expected directory, and the path to the plist directory is discussed in the immediately previous section of the manual you're working with. If you're logged into the user you want to edit, the plist files are here: ~/Library/Preferences/
So some of the bash-level commands that can be used here (and that you will want to understand) follow:
ls ~/Library/Preferences/
ls -alR ~/Library/Preferences/
cd ~/Library/Preferences/
The specific error here appears to be that the default directory is not in the expected directory. That's what cp has indicated; that there's no file with the specified filename here. The current directory is what the pwd and cd commands will work with, too. See +man pwd+ and +man cd+ for details.
The Unix layer is comparatively unforgiving, and it's easy to corrupt a disk with an errant command. And the manual you're reading isn't going to explain what are the basics of the Unix file system organization and the bash shell; that's assumed knowledge for that manual, and outside the scope of what that manual is going to be documenting. Do have a backup of your disk, and of your critical data.