Why is rename command missing from macOS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I usually rename files and directories with the mv command. I'm reading a book on bash shell that mentions the rename command. When I executed man rename a man page was shown. However, when I entered rename on bash shell, it reported:



-bash: rename: command not found



I did some research and discovered that you can install the rename command with Homebrew.



  • Is there any good reason not to install it with Homebrew?


  • Is there anything you can do with the rename command that you can't do with the mv command?


I'm also curious to know if there is a known explanation for why the rename command doesn't exist in the first place. And why is there a man page for a command that does not exist?



UPDATE: It appears that with the rename command you can do regexes like so:



rename 's/(.*)(.*)/new$1$2/' *



With mv, this doesn't appear to be possible.










share|improve this question























  • After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
    – StevieD
    Aug 21 at 3:15














up vote
2
down vote

favorite












I usually rename files and directories with the mv command. I'm reading a book on bash shell that mentions the rename command. When I executed man rename a man page was shown. However, when I entered rename on bash shell, it reported:



-bash: rename: command not found



I did some research and discovered that you can install the rename command with Homebrew.



  • Is there any good reason not to install it with Homebrew?


  • Is there anything you can do with the rename command that you can't do with the mv command?


I'm also curious to know if there is a known explanation for why the rename command doesn't exist in the first place. And why is there a man page for a command that does not exist?



UPDATE: It appears that with the rename command you can do regexes like so:



rename 's/(.*)(.*)/new$1$2/' *



With mv, this doesn't appear to be possible.










share|improve this question























  • After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
    – StevieD
    Aug 21 at 3:15












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I usually rename files and directories with the mv command. I'm reading a book on bash shell that mentions the rename command. When I executed man rename a man page was shown. However, when I entered rename on bash shell, it reported:



-bash: rename: command not found



I did some research and discovered that you can install the rename command with Homebrew.



  • Is there any good reason not to install it with Homebrew?


  • Is there anything you can do with the rename command that you can't do with the mv command?


I'm also curious to know if there is a known explanation for why the rename command doesn't exist in the first place. And why is there a man page for a command that does not exist?



UPDATE: It appears that with the rename command you can do regexes like so:



rename 's/(.*)(.*)/new$1$2/' *



With mv, this doesn't appear to be possible.










share|improve this question















I usually rename files and directories with the mv command. I'm reading a book on bash shell that mentions the rename command. When I executed man rename a man page was shown. However, when I entered rename on bash shell, it reported:



-bash: rename: command not found



I did some research and discovered that you can install the rename command with Homebrew.



  • Is there any good reason not to install it with Homebrew?


  • Is there anything you can do with the rename command that you can't do with the mv command?


I'm also curious to know if there is a known explanation for why the rename command doesn't exist in the first place. And why is there a man page for a command that does not exist?



UPDATE: It appears that with the rename command you can do regexes like so:



rename 's/(.*)(.*)/new$1$2/' *



With mv, this doesn't appear to be possible.







bash






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 21 at 3:32









Nimesh Neema

8,29131749




8,29131749










asked Aug 21 at 2:52









StevieD

432512




432512











  • After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
    – StevieD
    Aug 21 at 3:15
















  • After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
    – StevieD
    Aug 21 at 3:15















After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
– StevieD
Aug 21 at 3:15




After some more searching, I discovered that the reason there is a man page is because it is documenting a BSD system call, not the command. My question asks about installing this utility with homebrew, so it is applicable to the mac.
– StevieD
Aug 21 at 3:15










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










In the default install of macOS, rename man page is available in the section 2. As you can notice from the man page, rename is not a command but a BSD system call.



The Homebrew formula named rename is a Perl script. You should be fine with installing it. In-fact it can give you much more flexibility than plain mv command.



After you have installed rename utility via Homebrew, running man rename will show the man page for the installed utility and not the BSD system call.




I'm also curious to know if there is a known explanation for why the command does not exist in the first place.




rename is not a standard Unix command.




And why is there a man page for a command that does not exist?




As mentioned above, the man page present refers to the system call by the same name.






share|improve this answer






















  • Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
    – StevieD
    Aug 21 at 3:17










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "118"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f334273%2fwhy-is-rename-command-missing-from-macos%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










In the default install of macOS, rename man page is available in the section 2. As you can notice from the man page, rename is not a command but a BSD system call.



The Homebrew formula named rename is a Perl script. You should be fine with installing it. In-fact it can give you much more flexibility than plain mv command.



After you have installed rename utility via Homebrew, running man rename will show the man page for the installed utility and not the BSD system call.




I'm also curious to know if there is a known explanation for why the command does not exist in the first place.




rename is not a standard Unix command.




And why is there a man page for a command that does not exist?




As mentioned above, the man page present refers to the system call by the same name.






share|improve this answer






















  • Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
    – StevieD
    Aug 21 at 3:17














up vote
3
down vote



accepted










In the default install of macOS, rename man page is available in the section 2. As you can notice from the man page, rename is not a command but a BSD system call.



The Homebrew formula named rename is a Perl script. You should be fine with installing it. In-fact it can give you much more flexibility than plain mv command.



After you have installed rename utility via Homebrew, running man rename will show the man page for the installed utility and not the BSD system call.




I'm also curious to know if there is a known explanation for why the command does not exist in the first place.




rename is not a standard Unix command.




And why is there a man page for a command that does not exist?




As mentioned above, the man page present refers to the system call by the same name.






share|improve this answer






















  • Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
    – StevieD
    Aug 21 at 3:17












up vote
3
down vote



accepted







up vote
3
down vote



accepted






In the default install of macOS, rename man page is available in the section 2. As you can notice from the man page, rename is not a command but a BSD system call.



The Homebrew formula named rename is a Perl script. You should be fine with installing it. In-fact it can give you much more flexibility than plain mv command.



After you have installed rename utility via Homebrew, running man rename will show the man page for the installed utility and not the BSD system call.




I'm also curious to know if there is a known explanation for why the command does not exist in the first place.




rename is not a standard Unix command.




And why is there a man page for a command that does not exist?




As mentioned above, the man page present refers to the system call by the same name.






share|improve this answer














In the default install of macOS, rename man page is available in the section 2. As you can notice from the man page, rename is not a command but a BSD system call.



The Homebrew formula named rename is a Perl script. You should be fine with installing it. In-fact it can give you much more flexibility than plain mv command.



After you have installed rename utility via Homebrew, running man rename will show the man page for the installed utility and not the BSD system call.




I'm also curious to know if there is a known explanation for why the command does not exist in the first place.




rename is not a standard Unix command.




And why is there a man page for a command that does not exist?




As mentioned above, the man page present refers to the system call by the same name.







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 21 at 3:17

























answered Aug 21 at 2:59









Nimesh Neema

8,29131749




8,29131749











  • Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
    – StevieD
    Aug 21 at 3:17
















  • Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
    – StevieD
    Aug 21 at 3:17















Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
– StevieD
Aug 21 at 3:17




Just saw your answer after installing it with homebrew. Now man rename bring up documentation for the "User Contributed Perl Documentation" for the utility.
– StevieD
Aug 21 at 3:17

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fapple.stackexchange.com%2fquestions%2f334273%2fwhy-is-rename-command-missing-from-macos%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?