Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename directory in linux system

Tags:

linux

rename

I asked 'change filename without using mv command and rename function' few days ago, and @nos answered me. So I try to use 'link' function.(It seems to create a hard link.)

But, it is not available with a directory.

Is there any way to change a directory name without using 'rename' function and 'mv' command?

I can use my copy function and delete function, but it is too hard and wasteful to just change a directory name.

I just want to know whether there is any way to change a directory name without using 'rename' function and 'mv' command.

I'm so sorry about my poor English skill... ;(...

like image 418
Aosamesan Avatar asked Mar 24 '26 13:03

Aosamesan


2 Answers

Try this answer!

mv /home/user/oldname /home/user/newname
like image 124
Gonzalo Garcia Avatar answered Mar 27 '26 03:03

Gonzalo Garcia


If you just want to rename the folder(not moving file to different folder) use below command.

mv oldFolderName newFolderName

like image 39
Subham kuswa Avatar answered Mar 27 '26 02:03

Subham kuswa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!