New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The 'rename' command has multiple different versions #3125
Comments
Thank you for bringing this up, @principis. I spent some time and did some research, and here's a summary of what I could find about the These are the three programs which are contenders for this page:
So what's the deal? Which one is used and where?
My suggestion The TL;DR from what I explained above is that Given these facts, I would suggest to:
[1] Being installed as an alternative, for those who don't know, means that [2] Note that |
As additional data, here's the information from Homebrew on macOS:
Is this consistent with your findings, @mebeim? |
Update on other distributions and systems after some more digging:
So basically the main problem here is that on Linux, we have some distros which have a I would still suggest what I said above. Moving |
Sounds good to me. Thanks for the research :) I'll create a PR. Is this line fine? Or maybe too long?
|
Wow, that's wildly complicated. @principis: Sounds a bit on the wordy side. What about something like this? > This is the perl version of `rename`, which is the default on Debian. See `rename.ul` for the stand-alone version. |
@mebeim just to make sure we all understand the status quo, would you mind compiling the information above into a table? Something like this (just a draft; incomplete and almost surely incorrect):
|
Sure @waldyrious, that's actually a pretty good idea. I also took a look at Arch Linux. Here's a table:
Oh boy, that's really a mess... 😥 I really don't get why Debian (or at least Ubuntu) didn't go with the Important notes:
|
@mebeim Debian was first with the perl command in 1999.... According to this post On fedora |
Jesus, what a mess indeed. Thanks so much for doing the table! So after this, I suppose the next step is to create pages for the Windows and the macOS Also, what's up with the Arch and macOS/brew versions being different programs altogether? Is the original Perl rename not developed anymore? Would it make sense to suggest to both repositories to switch to the "standard" Perl |
@principis oh you're right there's the |
So @waldyrious yes, first of all I would remove On Debian,
so that's out of the game I'd say. As for the differences in all the Perl scripts, they really seem to be different, or at least they have different command line options. It's reeeeally confusing. I took a look at the authors for the ones I listed above, and they indeed are all different except macOS and Fedora (funny, huh).
The thing is that apparently a lot of people like to re-write their own version of rename inspired by the original Larry Wall's Perl example script. I would suggest the following:
|
@mebeim the Peder Stray versions seems to be adapted from Larry Wall's script
What do we do with |
@principis yes, but the Peder Stray's one is still a very different script. As for |
If we can use symlinks, and have them work properly (e.g. if when cloning the repo on linux, macos and windows) I'd say there's no downside to it. I'm not sure clients would have issues with them if they are properly replicated in the local filesystem. In any case, the |
@waldyrious the fedora |
Yep, that's the point @principis was making, he was talking about Fedora's |
Address the presence of multiple and different versions of the rename command as discussed in issue #3125. Changes made: - Moved common/rename.md to linux/prename.md, documenting the Debian Perl rename command (which is deprecated). - Created linux/file-rename.md for the Debian/Ubuntu `file-rename`. - Created linux/perl-rename.md with examples for Arch Linux `perl-rename`. - Created linux/rename.md for the `rename` command offered by the the `util-linux` package, the most common one and supported by the most platforms.
Related There's also Python version :) |
There are 2 versions of the
rename
command, a perl version for debian-based distros and the util-linux version which all other distros use. sourceThe page is written for the perl version.
This can cause problems (which it did for me because I'm using fedora) for users with the util-linux version because it doesn't use Perl expressions.
Perl: man-page
util-linux: man-page
I can't think of a solution for this problem... :/
The text was updated successfully, but these errors were encountered: