LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 06-28-2012, 10:56 AM   #1
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Rep: Reputation: 5
how to rename a file in solaris 10


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.
 
Old 06-28-2012, 10:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,085

Rep: Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957
this is the command mv (move)
 
Old 06-29-2012, 02:09 AM   #3
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
Thanks Pan64. So no explainationation still on "rename" command? I need someone to give me an insight please ?
 
Old 06-29-2012, 02:32 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,085

Rep: Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957Reputation: 4957
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.
 
Old 06-29-2012, 04:07 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Quote:
Originally Posted by Ribo01 View Post
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.
 
Old 06-29-2012, 11:43 PM   #6
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
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
 
Old 07-26-2012, 05:29 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: Currently: openSUSE, Raspbian, Slackware. Formerly: CentOS, MacOS, Red Hat. Other: Solaris, Tru64
Posts: 2,059

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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.
 
Old 07-26-2012, 07:09 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
It's both. The one which would appears with "man rename" depends on the MANPATH.
 
Old 07-27-2012, 03:08 AM   #9
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Rename a file in Solaris

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,

Last edited by shivaa; 07-27-2012 at 03:11 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
replace line in CSV file and rename file connected to that name wademac Linux - Newbie 3 07-15-2009 01:09 PM
Need to replace a file with a newer version but keep the old file via a rename Joe_P Linux - Newbie 4 04-30-2009 03:51 PM
How to rename a File System in Solaris 9 solarisnewbie Solaris / OpenSolaris 3 02-06-2009 08:34 AM
how to rename a file and copy a file in a shell zach014 Linux - Newbie 6 11-23-2006 09:23 AM
rename a file anoosh Programming 3 04-12-2006 02:15 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration