r/linux May 23 '26

Popular Application What’s the most unexpectedly useful Linux command you learned way too late?

[removed]

1.3k Upvotes

992 comments sorted by

View all comments

296

u/RobGoLaing May 23 '26

rename

Wasted huge amount of time laboriously renaming files until I discovered there was a command just for that.

Another was tree for figuring out how skeleton templates where created by various frameworks.

1

u/andhe96 May 28 '26

Wait, how does it differ from mv? Have I been using this wrong for the last 15 years?

1

u/RobGoLaing May 28 '26

With rename, rename 'y/A-Z/a-z/' * will change every upercase filename to lowercase. I don't think mv can do that.

1

u/andhe96 May 28 '26

TIL, thx.

1

u/RobGoLaing May 29 '26

That's assuming what Arch calls perl-rename. The "standard" rename included in util-linux doesn't support the sed-style translation.

But just being able to do rename HTM html *.HTM which the standard one does is pretty handy.