LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moving a file to the root of the drive via command line (https://www.linuxquestions.org/questions/linux-newbie-8/moving-a-file-to-the-root-of-the-drive-via-command-line-838618/)

1234rewq 10-17-2010 07:30 AM

Moving a file to the root of the drive via command line
 
How can I move a directory to the root of a drive via command line?

In MS-DOS it would be 'move C:/GAMES/QUAKE C:/'

What is the equivilent in Linux?

Nylex 10-17-2010 07:33 AM

Use the command mv: mv source destination, where source and destination are the obvious. Read the man page for mv ("man mv") for more info. This works for directories, as well as regular files.

1234rewq 10-17-2010 07:34 AM

Could you please give me and example of the command?

Nylex 10-17-2010 07:36 AM

It's not difficult:

mv stuff /tmp

will move the file stuff in the current directory to the directory /tmp.

1234rewq 10-17-2010 07:37 AM

Cool, I figured it out..

mv [DIRECTORY] /

1234rewq 10-17-2010 07:37 AM

It might not be difficult, but the question was moving it to the root of the drive, not the tmp directory.. thanks anyway.

Nylex 10-17-2010 07:39 AM

You asked for an example..

In any case, please mark your thread as "solved" if you consider the question answered.

1234rewq 10-17-2010 07:40 AM

Where is the solved button?

Nylex 10-17-2010 07:40 AM

It should be under "Thread tools" at the top of this thread.


All times are GMT -5. The time now is 05:48 PM.