VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Tools For Renaming Files In Linux DistroTube

Tools For Renaming Files In Linux DistroTube

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Tools For Renaming Files In Linux DistroTube In this video tutorial, I show several different methods for renaming files on Linux, including how to do more advanced things like bulk renaming, pattern substitutions, and changing lowercase to uppercase and vice versa. In this video, I mention several programs that I have made videos about, so be sure to check out: - https://www.youtube.com/watch?v=s3ii48qYBxA - Beginner's Guide To The Terminal - https://www.youtube.com/watch?v=rp7jLi_kgPg - Xargs - https://www.youtube.com/watch?v=BZ5gsFiIKOQ - Find & Locate - https://www.youtube.com/watch?v=47QYCa8AYG4 - Vifm
Date: 2022-03-30

Comments and reviews: 10


hey dt, i gave my 70 year old dad a linux laptop because win11 won't run on his old one, now everything works fine except his music collection, where i wanted to bulk rename files for organizing, the thing is, win and linux and even different linux machines seem to order files in different ways which is very odd and kinda destroys his whole way to keep track of the music
i have to say, his mp3s are named for sorting with spaces and numbers and letters, for example a song might be ' 11aab artist - title (year)' you know that game, but i didn't get it to sort them properly to rename them in bulk with some ongoing numbers, i think i could've figured it out with a little more time, but at that moment it put me kinda off
would be cool if you could make a video about that to not have other new to linux users run into that issue
peace

reply

Just a little aside - I worked for 10 years writing document management software and part of what I did was enforcing good naming conventions. It always amazed me just how lazy everyone was when it came to naming files even when legally required to do so. Despite having tools to do the work (scripts and applications) most files were still stored with non-descript default file names in arbitrary locations. The only time files were ever named appropriately was when they were automatically generated, even then the naming conventions still varied. File naming and location is still a big problem and people still believe that content searching will solve all their problems.
reply

thank u for this lesson
i have quistion sir
why i cant faind any ui aplication to do this
my nimo filemaneger come with bulky
its bad app
becase i hav gaint folder with defrent names
so i had to use kde app called krenamer
why i had to use tirminal for this simple task
in windows all you had to do sellect all file then shose a name then boom
every thing is perfect
im really love linux but you guys dont understand the defrent between home user and job user
if im home user I DONT NEED TIRMINAL
Onley UI APP for any task
how hard is that sir thank you

reply

Once I spent the whole night trying to rename and sort images which I imported from my phone. They were pictures of school notes and some of them were incorrect orientation or incorrect order. Too bad you didn't show something like that, e.g. bulk image rotation or some sorting etc. Or when you have a list of files named 1.txt - 100.txt and you remove one file in the middle of the list, the rest of the files gets renamed
reply

Here are some more useful rename commands that I use:
Remove everything within brackets and parentheses ()[]:
rename 's/\[.-?\]//g' - && rename 's/\(.-?\)//g' -
Remove brackets and parentheses ()[]:
rename 's/\(-\[-\]-\)//g' -
Remove first 3 characters:
for f in -; do mv -$f- -$-f:3--; done
Find and rename files with subdirectories:
find ./ -type f -exec rename 's/replace/with/g' -- \;

reply

One command I have used a fair bit is mmv. That does its own recognition of shell-style wildcards, substituting them into the output pattern. E.g.
mmv -v '-.TXT' '#1.txt'
renames files ending with .TXT to corresponding .txt, telling you what it-s renaming as it goes. It also provides the --n- option, where it shows you what it would do without doing it.

reply

A few days ago I needed to rename a bunch of files to randomly generated names but I didn't find an existing tool to do it, so I wrote a tool myself. It's a really niche need but if you ever want it for whatever reason, it's called rng-rename on GitHub. Written in rust too so hopefully that'll make aficionados happy
reply

Renaming files in a folder to sequential numbers. I use the second below command all the time.
ls -v - cat -n - while read n f; do mv -n -$f- -$n.mp3-; done
Beauty in one line:
ls -v - cat -n - while read n f; do mv -n -$f- -$n.ext-; done
You can change .ext with .png, .jpg, etc.

reply

Please, anybody, give me an example of a script which would rename anything in the directory to something like 01.jpg, 02.jpg, ..., 44.jpg, according to the specified file extension (.jpg in this case) in alphabet order. Otherwise it would keep a file untouched. I really need it.
reply

one word: szyszka Try it! intuitive to a point but a mild learning curve to really get it right for directories full of 'odd names' you have or need to rename in order to make sense of them or maybe just for organizational purposes. btw, yes it's a gui app...
reply
Add a review, comment






Other channel videos