Home Ask Login Register

Developers Planet

Your answer is one click away!

mshum February 2016

Moved a file to another directory in Unix. File is no longer in the original directory, but never showed up in the destination directory. Why?

I am having a problem with something seemingly very simple in Unix. I used the following code to move a file to another directory:

mv genes.gtf ./ ../..

The file is no longer in the original directory, but it has not shown up in the destination directory either! Has anyone experienced a similar thing before? What is causing the problem? Is it possible for it to take a while for a file to be moved, so it shows up in the destination directory with a big delay?


amanning February 2016

When 3 arguments are passed to mv, the first two are considered sources, and the last one is considered the destination. It seems you moved both genes.gtf and the current directory (./) to ../..

I think what you meant to write was mv genes.gtf ../..

As far as what happened to your file, I have no idea; I've never attempted to move ./ anywhere in unix/linux before.

Post Status

Asked in February 2016
Viewed 3,967 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life