Copying a file into a directory
I'm trying to instal a printer driver and as part of it I have to copy a file in my home directory into a sub-directory of the same (home) directory. The file is called turboprint.tpkey and the sub-directory is turboprint-1.91. I've tried using the cp command as root but I can't make it work. Can someone please spell out exactly what the command line should look like?
Tom |
cp ~/turboprint.tpkey ~/turboprint-1.91
paste any errors you got, as it should have errored out if it didn't work |
Thanks. I find it confusing where you should and should not type a / in a command.
Tom |
If you're typing a relative path, you leave off the leading /. (And any '../foo' path is relative.)
If absolute, you include it. When you use '~' it's sneaky because it includes the leading slash, standing for $HOME (/home/username). So when you use that, you're using an absolute path you need to remember has a leading / already. As far as the trailing slash, it often doesn't matter but it should definitely only have one if a directory is intended, never for a file, of course. I'm sure there are more details, but those are the factors that spring to mind. |
All times are GMT -5. The time now is 01:37 PM. |