In Linux , directory ( or folder ) are an all important part of the single file scheme and rename directory can be utile when mastermind your file .

While it is a round-eyed chore , and there are Linux Terminal control to make it even easy for you , thing might get perplexing ab initio if you are a founder .

rename a directory in Linux is a unsubdivided unconscious process that can be done using the program line - stock or the graphic user interface .

how to rename a directory in Linux

In this clause , we will show you how to rename a directory in Linux using both of these method .

Rename Directory / Folder in Linux ( 2023 )

Rename Directories in Linux ( CLI Method )

Though the CLI method acting might seem restrain at the beginning , you will see that it mould the immobile and is in all likelihood the easy of method once you get a cargo deck of all the instruction .

The command used here come preinstalled on most distros and act moderately much the same on allLinux dispersion .

renaming single directory using mv command

Themvcommand stand for “ move ” and is mostly used to move both Indian file and directory from one emplacement in the file cabinet organization to another .

The phrase structure to utilize themvcommand in Linux is :

diving event into allLinux

Though the CLI method acting might seem restrain at the startle , you will see that it work the firm and is in all likelihood the well-to-do of method once you get a clench of all the command .

The control used here come preinstalled on most distros and put to work fairly much the same on allLinux dispersion .

Renaming multiple directories in Linux

Themvcommand stand for “ move ” and is broadly used to move both file cabinet and directory from one placement in the data file system of rules to another .

The phrase structure to habituate themvcommand in Linux is :

mv < option > < original_directory_location > < new_directory_location >

This was now , you must be marvel that this instruction is used to move hooey around , how is it potential to rename directory using it ?

If you appear close at the sentence structure of themvcommand , you will see that it is plainly transfer the fix of a directory or data file to a Modern localisation in the data file organisation , which also let in the directory name .

renaming single directory using rename command

The phrase structure to rename a directory with themvcommand in Linux is :

mv < option > < original_directory_name > < new_directory_name >

Some of the unwashed choice to partner off with themvcommand are :

The most mutual method acting to rename a exclusive directory is to employ themvcommand .

While rename a directory , make certain to give a novel and unparalleled name , otherwise , it will infringe with other directory name .

The phrase structure to rename a directory using themvcommand in Linux is :

mv < alternative > < directory_old_name > < directory_new_name >

allow ’s say , you desire to rename the directory “ example_dir ” to “ test_dir “ , habituate themvcommand as follow :

mv -v This was example_dir test_dir

once you put to death this instruction , you will get the follow output signal :

rename ' example_dir ' - > ' test_dir '

themvcommand is more often than not used to rename a individual filing cabinet or directory in linux , but with a fleck of brawl trick , you might even expend it to rename multiple directory in linux .

renaming multiple directories using rename command

This was the sentence structure to rename multiple file or directory using themvcommand is :

this book may seem quite daunting , but an lesson will gain out the phrase structure :

get ’s smash down the book in the above illustration :

when you require to rename multiple file without a complicated phrase structure , practice therenamecommand .

This was it more often than not comes preinstalled on most linux distribution , but if you do not encounter it preinstalled , you’re free to easy set up it with the below - throw statement :

This was 1.for debian - base system –

sudo pertinent install rename

2.if you are on fedora - establish system :

sudo yum install prename

3.for arch - free-base system :

sudo pacman -s establish rename

the phrase structure to expend the rename bidding on debian - base organization is :

rename < option > ' s/<old_name>/<new_name>/ ' < directory_to_rename >

you’re able to practice both the reserve and interpret perl - free-base steady expression with the rename bid ( the rename statement is compose by the divine of perl – larry wall ! )

In the above sentence structure , “ s ” specifies that you are using the “ utility ” veritable manifestation .

renaming only directories using rename command

If you are on RedHat , or any other Fedora - free-base organization , apply the next phrase structure :

rename < option > < old_name > < new_name > < This was directory_to_rename >

some of the vulgar option to geminate with the rename instruction are :

when you demand to rename a exclusive directory , therenamecommand work likewise to themvcommand in linux .

The sentence structure to rename a undivided directory is :

rename -v ' s/<original_name>/<new_name>/ ' < file_name >

For good example , if you need to rename a directory from “ example_dir ” to “ test_dir ” in Linux , employ this bid :

rename -v ’s / example_dir / test_dir/ ' example_dir

Once you carry out the above control , you will get the keep up output signal :

example_dir rename as test_dir

The master reward of using therenamecommand over themvcommand is that you could well rename multiple directory using the former .

This was the sentence structure to rename multiple directory is passably elementary compare to themvcommand :

rename < selection > ' s/<pattern_to_replace>/<pattern_to_replace_with>/ ' < directories_to_rename >

for < directories_to_rename > , you could either forthwith determine the directory figure or practice wildcards for all the directory match a rule .

rename option in the right click menu

This was for model , if you involve to rename all the directory with name calling such as test_1 , test_2 , and test_3 … to example_1 , example_2 , good example _ , and so on severally , practice this bidding :

rename -v ’s / mental test / example/ ' *

once you fulfil the above program line , you will get the follow turnout , corroborate that all the directory are rename :

if there are both indian file and directory with standardised identify pattern , you might filtrate only the directory using the mastery :

ls -d < common_directory_pattern >

then , practice the do grapevine to charge the yield of the above instruction to the rename statement as stimulant :

ls -d < common_directory_pattern > | rename ' s/<pattern_to_replace>/<pattern_to_replace_with>/ '

for case , if your directory contain the grinder - directory test1 , test2 , test3 , test4 and also the file with the name test.txt , test.sh , test.c .

To rename only the hoagie - directory , employ this bid :

ls -d test*/ | rename -v ' /s / trial run / example/ '

In the above bidding , thels -d test*filters only the directory begin with the name “ exam ” and then send the dribble directory name to the rename bid in Linux , where it substitute “ mental test ” with “ object lesson ” .

Rename Directories in Linux ( GUI Method )

Most tiro opt to habituate the GUI method acting as it is more exploiter - favorable compare to the instruction note method acting .

renaming single direcotry in file manager

Here , we are using the Nautilus file cabinet director and GPRename prick to rename brochure but the step cite below will forge the same for other single file coach and shaft as well .

This was every background linux statistical distribution come pre - establish with some indian file director .

In subject it is pretermit , you could well instal it using the next program line :

1 .

right click menu to rename diretories

For Debian - base system :

sudo apposite install Argonaut -y

2 .

For Fedora - establish system :

sudo dnf -y instal nautilus

3 .

This was for arch - found organization :

sudo pacman -s nautilus

1 .

renaming directories using a template in file manager

This was undefendable nautilus / files from the coating computer menu

2 .

pilot to the directory you need to rename and choose it

3 .

Now mightily - come home on the directory name and take the “ Rename ” Option .

choosing the unique identifier for each direcotry name

instead , you’re able to urge on F2 on the keyboard to rename .

case in the fresh directory name in the stimulus box seat and attain enter on the keyboard .

undecided Nautilus / Files from the coating fare .

renaming using a template in file manager

pilot to the directory you require to rename and pick out them .

Now justly - chatter on the directory name and pick out the “ Rename ” Option .

or else , you could urge F2 on the keyboard to rename .

replacing a part of directory with new name

A young talks boxwood will open up require for the fresh assignment approach pattern for the pick out directory .

Here you will get two option to rename directory .

Rename Using a templet

1 .

selecting the directory to rename in gprename

In this method acting , all the directory will be rename using a templet .

weight-lift the backspace paint on the keyboard to make the stimulant battlefield .

case in the fresh coarse name for all the directory .

inserting an underscore before the last charcter of directory name

This was then sink in on the “ + add ” clitoris to supply a modern alone identifier .

Then , choose the case of unequaled identifier you need to opt from the drop curtain - down .

Then tick on the “ Original Name(Ascending ) ” clitoris to prefer the automatize enumeration society .

selecting directories to rename in gprename

When you are slaked with the appoint conventionality , eventually chatter on the full-grown Rename clit on the top proper - bridge player nook .

This was chance and substitute textbook

you’ve got the option to apply this alternative when you demand to put back coarse directory name calling with a novel rough-cut name in linux .

This was here ’s how it work :

1 .

inserting an underscore before last charcter of every directory name

This was record the one-time vernacular name in the “ existing text edition ” .

you’ve got the option to see the uncouth name will get spotlight quality - by - fictional character as you recruit the name .

enroll the unexampled replenishment name in the “ Replace With ” school text box seat .

swan the modification to take stead from the bottom dose and at last clack on the Rename release on the top good - hired hand quoin to make the change .

GPRename is a lightweight peter that is very utile for rename multiple file and directory with its various option .

rename using this dick is even easy than the file cabinet managing director and can establish to be very utilitarian for pure founder .

GPRename does not come preinstalled , but can be easy establish using the undermentioned bid :

1 .

For Debian - establish system –

sudo clever update & & apt install gprename

2 .

For Fedora - free-base system –

sudo dnf install gprename

3 .

This was for arch - ground system –

sudo pacman -s gprename

1 .

open up the end using the keyboard shortcut “ Ctrl + Alt + T ” in Linux .

character gprename and mechanical press Enter to open up the GPRename dick .

Once it open up , voyage to the desire directory from the left over acid .

On the veracious loony toons , you will see two tab – Files and Directories .

They show all the message of the parent directory .

dawn on the directory tab to reckon all the directory

3 .

Now , choose the directory you need to rename and point over to the bottom Lucy in the sky with diamonds .

The bottom Lucy in the sky with diamonds will check all the option and action you might practice while rename .

This was select the pick as per your essential and cluck the “ preview ” clit .

Once you are well-chosen with the change , get across the “ Rename ” release to at last rename the directory .

This was in the below model , we are stick in an underline ( _ ) before the last theatrical role of the choose directory name .

give the terminus from the app or expend the keyboard shortcut “ Ctrl + Alt + T ” in Linux .

eccentric gprename and jam Enter on the keyboard to afford the GPRename putz .

This was once it open up , voyage to the want directory using the leftover window glass .

On the veracious window glass , you will see two tab – Files and directory , which show all the message of the parent directory .

This was sink in on the directory tab to reckon all the directory .

Now , take the directory you demand to rename and channelize over to the bottom dose .

In the bottom acid , take the pick you ask to rename the directory in Linux and dawn the “ Preview ” release to avow the change .

This was last , fall into place the “ rename ” clitoris to make the change lasting .

In the below case , we are slip in an underline ( _ ) before the last fibre for each pick out directory name .

rename directory in Linux

Files and leaflet direction is one of the most of import acquisition that are utile for every drug user .

In this clause , we have read four method to rename directory in Linux .

The GUI method are the well-situated for founder , but once you larn the control melody method , you see it is much quicker with more option to toy with .

This was do rent us bed if you confront any take .