liza
liza

Reputation: 494

Why Error while moving a file from the directory1 to a directory2 in linux?

Getting an error like this while moving one file from one directory to another directory inside it:

mv: cannot stat '/Home/Documents/liza_susan/org_chart.html': No such file or directory

My linux command is:

 mv /Home/Documents/liza_susan/org_chart.html Home/Documents/liza_susan/task

But the error is showing no such file or directory

LooK A

see this image.. I want to move this org_chart.html file from liza_susan directory to task directory in liza_susan directory

Upvotes: 0

Views: 1861

Answers (1)

tmaj
tmaj

Reputation: 35037

This error means that /Home/Documents/liza_susan/org_chart.html does not exist. Are you sure the path is correct?

A couple of guesses:

  • /home/*USERNAME_HERE*/Documents/liza_susan/org_chart.html, or
  • /home/liza_susan/Documents/org_chart.html
  • ~/liza_susan/Documents/org_chart.html

Update

Do this:

  1. cd ~
  2. pwd
  3. Use this for your mv command (making sure you take care about case-sensitivity`)

Update 2

You can do this to avoid the /home trouble

  1. cd ~
  2. mv Documents/liza_susan/org_chart.html Documents/liza_susan/task

or even

  1. cd ~/Documents/liza_susan
  2. mv org_chart.html task

Upvotes: 2

Related Questions