Rename linux directory

-1

Good I expose you the small problem that I have, I have updated a theme in wordpress and the old one I have changed the name, to the directory I have put .old at the end, but now I can not access.

I tried renaming it again with -old at the end but it does not let me use the mv command "no such file or directory

 mv theme theme.old


 mv theme.old theme-old 

  " mv: cannot stat theme.old: No such file or directory "

    
asked by Caldeiro 05.12.2018 в 10:09
source

2 answers

3

You have an erratum:

The file is called dt-th e 7.old

You are trying to rename a file called dt-th7.old (without the e)

Demonstration on my PC:

pablo@Pablo-asus:~/temp$ ll
total 12
drwxrwxr-x  2 pablo pablo 4096 dic  5 10:47 ./
drwxr-xr-x 47 pablo pablo 4096 dic  4 15:43 ../
-rw-------  1 pablo pablo   66 oct  2 18:01 .directory

pablo@Pablo-asus:~/temp$ mkdir dt-the7.old
pablo@Pablo-asus:~/temp$ ll
total 16
drwxrwxr-x  3 pablo pablo 4096 dic  5 10:48 ./
drwxr-xr-x 47 pablo pablo 4096 dic  4 15:43 ../
-rw-------  1 pablo pablo   66 oct  2 18:01 .directory
drwxrwxr-x  2 pablo pablo 4096 dic  5 10:48 dt-the7.old/

pablo@Pablo-asus:~/temp$ mv dt-the7.old/ dtheme
pablo@Pablo-asus:~/temp$ ll
total 16
drwxrwxr-x  3 pablo pablo 4096 dic  5 10:48 ./
drwxr-xr-x 47 pablo pablo 4096 dic  4 15:43 ../
-rw-------  1 pablo pablo   66 oct  2 18:01 .directory
drwxrwxr-x  2 pablo pablo 4096 dic  5 10:48 dtheme/

With mv it should work perfectly

    
answered by 05.12.2018 в 10:41
1

As a suggestion to prevent it from happening again (and as an opportune moment to show how beautiful these programs are). When you type mv , or some other command, press the Tab key to activate the auto-complete function (see

answered by 05.12.2018 в 11:26