File lost using mv - Ask Ubuntu


went directory 7z file located. used command

mv file.7z /home  

i logged in root directory file located , launched command root. can't find file anywhere. searched home folder root , user with

ls -la

but still no joy. know file has been moved original directory empty.

i suspect file not lost, has been moved root directory , renamed home.

you should find file in root directory called home. file.

why happened

the filesystem in unix/linux case-sensitive, meaning home , home not refer same thing. while intended move directory called home, used capital h, did not find such directory , instead interpreted command request move , rename new file called home.

solution

always use correct case. have prevented happening adding trailing slash after directory name, eg.

mv file.7z /home/ 

this cause home directory. if didn't find such directory, instead of renaming home file, have failed.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User