Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello y'all! Would like to know how to rename a file in solaris 10. I tried using "rename", but its tells me "rename not found" I also tried using "which -a rename" to get the full path for the command, but its tells me rename isn't listed in any of the path. But when I type "man rename" its actually brings out the man page of "rename" so am wondering why the rename command isn't working ?? If there is another way to rename a file in solaris 10 please I would like to know it! Hope to read from someone soon.
what kind of explanation are you waiting for? there is no such command. The command you need is mv. The "basic" commands in a unix/linux environment usually consist of 2 letters only, like sh, ln, cp, mv, rm, ls, vi, ed... The next set of commands are 3-4 letters long: sed, find, grep, more, tail, file, type, cat, less, perl, ping, awk ...., some "extreme" long commands are: touch, which, fdisk or mkdir. But traditionally there is no such a long command as "rename". (Obviously nowadays the new and complicated commands are longer, because 2 letters are not really enough - see netstat, traceroute or xscreensaver). Actually rename is now implemented in the linux world, see here: http://linux.die.net/man/1/rename, but it is not what you are looking for.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by Ribo01
But when I type "man rename" its actually brings out the man page of "rename" so am wondering why the rename command isn't working ??
You should look closer to the man page you are seeing. It is likely the TCL built-in rename command documentation which isn't something directly available to the shell and isn't meant to rename files anyway.
Thanks again to pan64 and jllagre, u guys really gave me a better understanding to all I needed to know, with a lot more I didn't know before. A little word of advise I think we should always give more insights to questioned asked, cause if I have an idea, I won't ask in the first place, and its also built better understanding a benefit for all. Thanks as always, this forum is awesome! Regards y'all cheers
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,818
Rep:
Quote:
It is likely the TCL built-in rename command documentation which isn't something directly available to the shell and isn't meant to rename files anyway.
It looks like it's even lower-level than that. It appears to be a system call used by C programs.
Hi, first of all there's no "rename" command in Solaris.
On the other hand, if you want to rename a file, simply move it to the new filename using "mv" command as follow:
# mv <filename-to-be-rename> <new-file-name>
Regards,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.