mv is a UNIX command to move a file to another directory or rename it.

learn more… | top users | synonyms

58
votes
12answers
83k views

How to move all files from current directory to upper directory?

How to move all files from current directory to upper directory in linux? I tried something like mv *.*, but it doesn't work.
32
votes
5answers
1k views

In bash, how can I rename a file without repeating the path? [duplicate]

Possible Duplicate: Reuse text on a bash command If I want to rename a file a few directories deep, how can I avoid repeating the path? For example: mv path/to/old_filename.txt ...
2
votes
5answers
3k views

Move all files in sub-directories to current directory?

I've got files in a bunch of subdirectories, and I'd like to flatten them out and move them all to the current directory. I found this question, but adapting the answer to: mv * . didn't work. I ...
2
votes
3answers
120 views

I used mv ./*/* to flatten a directory on a ntfs filesystem, without add . to the end of the command, now all of my files are gone

How can I recover these files? I used: mv ./*/* when it was supposed to be mv ./*/* . Now all of my files are gone.
0
votes
1answer
182 views

Move files based on list of old and new file paths

What is an efficient way to rename files in OSX/BSD from a text file for files assumed to stay in original folder, but in the format of; /path/old file name.ext\tnew file name.ext There may be ...