Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
ok, i'm in the dir "/data/temp/new/"
and i want to move all the files in this drive to "/data/etc/multimedia/"
i've done "mv * /data/etc/multimedia/" and he asks me if i want to overwrite the directory /data/etc/multimedia
what did i do wrong?
how can i move all the files from the folder i'm in to another folder on the hard drive?
i've checked "man mv" but i can't seem to find this exact problem.
You don't need to be in the directory of the files you wish to move. As long as you know where they are and where they need to go, you can use the mv command.
Last edited by {BBI}Nexus{BBI}; 03-28-2007 at 09:16 AM.
The 'mv' command has the effect of re-naming files as well as moving the file to a different location. So, what that means is you have to use a name in the source file.
Say, for example you had files file1.mp3 file2.mp3 and file3.mp3 in the source directory. You want to move all in one command...
'mv /data/temp/new/*.mp3 /data/etc/multimedia/' should move all files with the extension of .mp3 to the destination directory and erase all copies in the source directory. They should keep the same permissions, and file names.
Move can be a little dangerous, so until you are sure of what you are doing, you could use the -i option. Mv will then prompt you on each move. A little safer...
You can also do this kind of thing with a graphical file manager. Knoqueror Krusader and Nautlius just to name three that will do what you want.
Move can be a little dangerous, so until you are sure of what you are doing, you could use the -i option. Mv will then prompt you on each move. A little safer...
This is very true, as an extra precaution you could use the cp (copy) command instead. If all copies correctly delete the source files after.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.