View Single Post
Posts: 12 | Thanked: 18 times | Joined on Sep 2010
#5
Originally Posted by nicholes View Post
hello i m new here also in n900 i want to rename a file using x terminal.i did "cd camera" then enter succeeed then i type"mv filename filename2" then enter.it says cannot rename (filename) : no such file or directory" m i doing something wrong?if yes then tell me step by step plz also plz answer me this is my first thread!!!!
Agree with all of the above replies. However, there is a definitive way to see whether filename1 exists: at the point when you are ready to type "mv filename1 filename2" (i.e. after you have done "cd camera"), then instead of typing that "mv" command, type this:

ls filename1

(Of course, you substitute filename1 with the actual filename, like abc123.jpg or whatever.)

This will list all files that are called filename1 ("ls" is short for "list"). If the response is a line that contains filename1, then filename1 exists. If there is no response or it says there's an error, then filename1 does not exist.

If it does exist, then something weird is going on: you should be able to use the "mv" command to rename the file. In that case, type this command:

ls -l filename1

watch the spacing and letters: that's lower-case L, then s, then space, then hyphen (or minus), then lower-case L, then space, then the filename.

Then tell us the result of the "ls -l filename" command.

On the other hand, if the file does not exist, that's why you can't rename it. Type this command:

pwd

This will tell us what directory you are currently in ("print working directory"). Then tell us what it says.
 

The Following User Says Thank You to C.Whiteham For This Useful Post: