Trouble Renaming directories/files
- Login o registrati per inviare commenti
When I try to rename in the GUI (nautilus) the name of the dir or file is highlighted as though i should be able to edit the name but nothing happens when I type...
When trying to rename from the command line, I get the following message:
(this is an example of a directory labeled 'dir1')
"Bareword "dir1" not allowed while "strict subs" in use at (eval 1) line 1."
Thanks for any help.
I don0t know exactly the error message bu could you post the exact command you'r trying to use?
To edit the name of the file in Nautilus, select the file, right-click on the
file, and select 'rename'. You should now be able to type the new
file/directory name.
To rename files through the terminal under UNIX, there is no dedicated 'rename'
command as in, say, DOS. Instead you should use the 'mv' (move) command, which
is normally used to move files around. However, if you use mv with the
following syntax:
mv
the file will be 'moved' to the same location, but with a new name. This is
UNIX' equivalent of a rename command. You were trying to use the 'rename'
command- that's actually a Python script designed to batch-process file names
(and other things). This is quite misleading. The command to use is not rename,
but mv.
Good luck.
To edit the name of the file in Nautilus, select the file, right-click on the file, and select 'rename'.
Or F2.
- Login o registrati per inviare commenti