Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ookleuk@ookleuk-Swift-SF314-55:~/Documents$ mv Geheimhoudingsverklaring LSM RA.odt /Place
mv: target '/Place' is not a directory
ookleuk@ookleuk-Swift-SF314-55:~/Documents$ ls
'Geheimshoudingsverklaring LSM RA.odt' Place 'Python notes.odt'
As you can see, I'm trying to move the file 'Geheimshoudingsverklaring LSM RA.odt' into the Place directory. How come the terminal tells me it's not a directory? How should I move it then?
Where is the "Place" directory, under your user's /home directory? The command you referenced attempts to move the file to a directory under "/" which is the root of the OS. You probably want the document to be moved under ~/Place, not /Place.
Where is the "Place" directory, under your user's /home directory? The command you referenced attempts to move the file to a directory under "/" which is the root of the OS. You probably want the document to be moved under ~/Place, not /Place.
Ahh, that must be it then. The 'Place' directory is within the 'Documents' folder (it is not directly located under 'home'). The path should be /home/ookleuk/Documents/Place. How would replacing the 'Geheimshoudingsverklaring LSM RA.odt' to the 'Place' folder work syntax-wise?
provided you are in the directory where that document is located. If not, then you'll have to reference the source and destination directory full paths.
provided you are in the directory where that document is located. If not, then you'll have to reference the source and destination directory full paths.
I am not sure that your reply is completely correct. File names with spaces need special handling, otherwise the command can give unexpected results.
Or mv Gehe<tab>, depending on how many documents starting with Geheimhoudingsverklaring are in the directory. Bash will autocomplete the filename, and insert the proper escape characters for you. To me, that's the easiest way to get any filename, but especially for files with odd characters in the name. I seldom type the full name of any file, and my Tab key gets used a lot.
Instead of doing "/Place", do Place. If you do /Place, it'll think it's in the system's main directory (where stuff like the home & usr directory is stored). Hope this helps.
It turns out there was a typo in the filename, apparently :')
The command that made it work was mv Geheimshoudingsverklaring\ LSM\ RA.odt ~/Documents/Place
The typo was in the 's' behind 'Geheim'
Thanks for the help still, and also thanks for that useful article on spaces in file names!
In this specific case, this:
Code:
mv Geheimshoudingsverklaring\ LSM\ RA.odt Place
(or variations as per above) would've sufficed.
Tip: use <tab>completion: hit <tab>key twice to see what's possible. Type the first letter, hit <tab>twice again...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.