Install the Linux rename utility | 22 comments | Create New Account
Click here to return to the 'Install the Linux rename utility' hint |
The following comments are owned by whoever posted them. This site is not responsible for what they say.
If the file or folder you want to rename is in the current working directory (to check your current working directory just type pwd on terminal and hit return): mv old-folder-name new-folder-name. If the file or folder you wish to rename is not in the current working directory then. MORE: Best Apple Laptops How to Use Full-Screen Apps in Mac OS X. Click on the green circle on the top left of the application window to enable full-screen mode. Hover the cursor over the. Apple introduced Dashboard app in OS X Tiger version and added the app be default in dock. But from Yosemite, Apple removed Dashboard app from the dock and encourage users to use Notification Center instead. In our opinion, dashboard app is still a convenient way to get chores done on regular basis instead of looking for notification center.
Putting the binary in /usr/bin is a bad idea. That folder is not guarenteed to be preserved across updates, while /usr/local/bin is less likely to be wiped out. Same goes for the man page.
There is no single 'Linux rename utility' unfortunately - so be careful that this is the one you expect. The one installed in Debian is a perl script with the syntax The one installed by RedHat (or whatever it's become nowadays) is different - it's a C program, and is the same one referred to in the hint. It's syntax is
OK, dumb question: do any of these utilities handle the resource forks or does the user have to 'manually' identify them?
not a dumb question.
it will probably not handle resource forks etc, so might end up disconnecting a file from its resource when you rename it, or it might work perfectly well.
i guess you would have to try it to see...
it will probably not handle resource forks etc, so might end up disconnecting a file from its resource when you rename it, or it might work perfectly well.
i guess you would have to try it to see...
The unix commands that operate on files (mv and rm for example) have always handled resource forks under Mac OS X. They operate on directory entires, and despite appearances, there is only one directory entry for a Mac OS X file, whether iot has a data fork, resource fork or both.
Tiger (10.4) adds support for resource forks to the standard unix commands that operate on file data (cp for example).
Tiger (10.4) adds support for resource forks to the standard unix commands that operate on file data (cp for example).
For those that like their rename utility to have a GUI, check out the shareware app Name those Files! It features GREP search and replace, advanced numbering, inclusion of the parent folder name, date insertions, and more.
Jon
Jon
Automator also does a nice job of incrementing file names and doing word and character replacements on file names.
Of course AppleScript can also be very useful here, but that usually requires a lot more programming knowledge and tends to be fairly specific to the naming that needs to be done.
---
Jayson --When Microsoft asks you, 'Where do you want to go today?' tell them 'Apple.'
Of course AppleScript can also be very useful here, but that usually requires a lot more programming knowledge and tends to be fairly specific to the naming that needs to be done.
---
Jayson --When Microsoft asks you, 'Where do you want to go today?' tell them 'Apple.'
Another option, one that comes with OS X, is to use the z-shell:
1. Fire up the zshell by typing zsh
2. Define this alias:
mmv='noglob zmv -W'
3. Issue the command:
autoload -U zmv
(You can put the commands for 2 and 3 into your .zshrc file).
Then you can issue the command
mmv photo_*.tiff photo_*.tif
and it will change all files of the form
photo_anything.tiff to the form photo_anything.tif
The nice thing is you don't have to install anything. You can call it rename instead of mmv, or whatever else suits you.
zsh has many more really nice features like this.
1. Fire up the zshell by typing zsh
2. Define this alias:
mmv='noglob zmv -W'
3. Issue the command:
autoload -U zmv
(You can put the commands for 2 and 3 into your .zshrc file).
Then you can issue the command
mmv photo_*.tiff photo_*.tif
and it will change all files of the form
photo_anything.tiff to the form photo_anything.tif
The nice thing is you don't have to install anything. You can call it rename instead of mmv, or whatever else suits you.
zsh has many more really nice features like this.
'Replace Text in Item Names.scpt' does the same thing too.
I wrote an extremely useful Perl script to rename many files simultaneously using Perl regular expressions as opposed to shell globs. For instance, to rename all files ending in 'tiff' to 'tif' (as shown above), one would execute:
More than one regular expression can be applied serially to each file:
It's vastly more powerful than a glob-based rename function; provides 100% compatibility with Perl regular expressions; prints output (which can be suppressed) showing each regular expression as it's applied; and has a test flag ('-t') to see the result without actually performing the operation. Advanced command-line users and sysadmins will find this particularly useful. I use it myself several times a day.
You can download ren-regexp here. Let me know what you think.
Michael.
Here's one that I wrote that has fewer options, but I find it very useful. It accepts full perl regular expressions as arguments. So something like:
remv -t *.jpg 's/oldname(d)(.jpg)/newname$1$2/'
will rename 'oldname1.jpg' and 'oldname2.jpg' to 'newname1.jpg' and 'newname2.jpg' repectively.
remv -t *.jpg 's/oldname(d)(.jpg)/newname$1$2/'
will rename 'oldname1.jpg' and 'oldname2.jpg' to 'newname1.jpg' and 'newname2.jpg' repectively.
One more time. It ate my backslashes.
The backslashes got eaten in the first comment. On the command line you should type the command like this: and it will print: then to actually rename the files use the '-r' switch instead of '-t'
when accessing the ren-regexp link on your page i get the following result: - Forbidden
You don't have permission to access /perl/script/ren-regexp on this server. Apache/1.3.33 Server at www.Michael-Forman.com Port 80
Fixed! I had a symlink problem that's now been resolved.
Michael.
Michael.
I thought I'd include the code here in the event of a future symlink error. ;)
The latest version of the code can be found here.
Michael.
The latest version of the code can be found here.
Michael.
An easier of reading, powerful and short is the next one (manage Tcl regexps and admits -recursion, -capitularization....)
Can anyone post the man page for this or a URL to the maintainer page - I'd rather see it's features before installing it.
Thx -
Thx -
How To Rename Full Screen Apps Mac Os X
Why not usemv
??---
Ian
Ian
Full Screen Shortcut
Try it. You will see it won't work for batch-renaming.
The reason is that one shouldn't just use 'mv' is that it only operates on one file at a time. If you need to rename multiple files in a similar way a rename program or script can save a lot of time. For instance, I was taking screenshots tonight using Apple Remote Desktop. I had to add on a numerical suffix to each snapshot as I took it and later I wanted to clean up the names. What I had was: What I did was the following: Actually, my program ren-regexp can take all those regular expressions on a single line: What I was left with was: I typed 94 characters with the above command and it saved me 30 mouse clicks and 270 characters and that's just for 15 files. Imagine how much effort you could save if you had hundreds of images that you need to rename.
Michael.
Michael.
I had some trouble getting configure to run. It would fail with the following error:
checking for blkid_known_fstype in -lblkid... no
configure: error: blkid or volume_id is needed to build util-linux-ng.
Rather than trying to get the configure script working, I built rename manually. First, I had to add the line
#define PACKAGE_STRING 'util-linux-ng 2.13.1.1'
to the beginning of the file 'misc-utils/rename.c'. Then I was able to compile it (from the misc-utils directory) with the following command:
gcc -I../include/ rename.c -o rename
This creates an executable that seems to work just fine.
checking for blkid_known_fstype in -lblkid... no
configure: error: blkid or volume_id is needed to build util-linux-ng.
Rather than trying to get the configure script working, I built rename manually. First, I had to add the line
#define PACKAGE_STRING 'util-linux-ng 2.13.1.1'
to the beginning of the file 'misc-utils/rename.c'. Then I was able to compile it (from the misc-utils directory) with the following command:
gcc -I../include/ rename.c -o rename
This creates an executable that seems to work just fine.
How To Rename Full Screen Apps Mac Os High Sierra
No, you cannot rename the apps. But you can group them into types or topics, and put them in folders. You can call the folders what ever you want, like good games, dumb games, utilities etc.
At least with grouping, you have a chance at finding what you are looking for.
How To Rename Full Screen Apps Mac Os 10.10
To create a folder, touch and hold any app until they start to wiggle. Then move any app on top of any other app and they will create a folder that you can name, then put other apps of the same type inside. When you are done, hit home to stop the wiggleing.