Why is rename command missing from macOS?
Clash 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 themv
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
add a comment |Â
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 themv
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
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
add a comment |Â
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 themv
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
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 themv
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
bash
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
add a comment |Â
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
add a comment |Â
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.
Just saw your answer after installing it with homebrew. Nowman rename
bring up documentation for the "User Contributed Perl Documentation" for the utility.
â StevieD
Aug 21 at 3:17
add a comment |Â
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.
Just saw your answer after installing it with homebrew. Nowman rename
bring up documentation for the "User Contributed Perl Documentation" for the utility.
â StevieD
Aug 21 at 3:17
add a comment |Â
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.
Just saw your answer after installing it with homebrew. Nowman rename
bring up documentation for the "User Contributed Perl Documentation" for the utility.
â StevieD
Aug 21 at 3:17
add a comment |Â
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.
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.
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. Nowman rename
bring up documentation for the "User Contributed Perl Documentation" for the utility.
â StevieD
Aug 21 at 3:17
add a comment |Â
Just saw your answer after installing it with homebrew. Nowman 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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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