0

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

liza
  • 484
  • 2
  • 6
  • 21
  • 1
    In Linux file and directory names are case sensitive. Try `/home`instead of `/Home`. Check the names of the other directories and of the file, too. – Thomas Stets Aug 23 '18 at 04:49
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Aug 23 '18 at 04:54
  • see the updated question.. i have uploaded an image – liza Aug 23 '18 at 04:59
  • Use a terminal and shell commands, including `pwd`, `ls`, `stat`, `mv`. Be aware of [globbing](https://en.wikipedia.org/wiki/Glob_(programming)) so see [glob(7)](http://man7.org/linux/man-pages/man7/glob.7.html). Your home directory is probably not `/Home` but something like `/home/liza`. Try `echo ~` and `echo $HOME` to find out – Basile Starynkevitch Aug 23 '18 at 05:06
  • 1
    Please let us Google that for you... [mv: cannot stat No such file or directory in shell script](https://unix.stackexchange.com/q/77007/56041), [File exists but mv errors out with: “mv: cannot stat ‘file.tar.gz’: No such file or directory”](https://unix.stackexchange.com/q/222793/56041), [mv: cannot stat with *](https://askubuntu.com/q/164497), [mv: cannot stat error](https://stackoverflow.com/q/34091346/608639), [mv: cannot stat error : No such file or directory error](https://stackoverflow.com/q/12729784/608639), etc. – jww Aug 23 '18 at 05:07

1 Answers1

2

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
Community
  • 1
  • 1
tymtam
  • 31,798
  • 8
  • 86
  • 126