I have been using *nix systems for a while now, and I was surprised to see this situation in which mv misplaces or deletes my file. For example, I had a file foo.txt in the directory called previousVersions, and when I was in that directory's parent directory, I issued the command mv previousVersions/foo.txt ..expecting it to move foo.txt up to my working directory. Instead, foo.txt is in neither the original directory nor my working directory. Why did this happen and where did my file go?
mv .. with path: Where does my file go?
mv;working directory
mv previousVersions/foo.txt .. will move the file foo.txt to the directory above your working directory. To have the file be moved to your working directory, replace .. with .:mv previousVersions/foo.txt .With the file presently in the parent directory of your current working directory, you can move it to your current working directory with this command:mv ../foo.txt . 