02-19-2010
The command as I mentioned isn't working for me. I m not sure if I am using the right syntax.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an audit log that is produced each day from a production printer. It names the file using todays date, but it removes the leading zero's. For example: todays date 060104 names the file 6104.txt.
I ftp this file onto a Sun box and pull stats off of it. To keep some consistency to what I am... (2 Replies)
Discussion started by: dbrundrett
2 Replies
2. Shell Programming and Scripting
Hi,
Is it possible to rename with wild charaters as destination name
ex
I wanna rename xxx_1010_zzz_0.txt to aaa_1010_zzz_1.txt,
yyy_1000_ppp_1.txt to bbb_1000_ppp.0.txt
I wanna reatin some of the patterns in the filename, rest I wanna rename.
like
mv... (2 Replies)
Discussion started by: braindrain
2 Replies
3. Shell Programming and Scripting
How can I rename files named like these
iq - 000001 - 2008.07.31 - 14.49.47 - location1.bin
iq - 000001 - 2008.07.31 - 14.49.47 - location12.bin
iq - 000008 - 2008.07.31 - 14.52.01 - location500.bin
to
iq_2008.07.31_14.49.47_location1.bin
iq_2008.07.31_14.49.47_location12.bin... (7 Replies)
Discussion started by: larne
7 Replies
4. Shell Programming and Scripting
Hi All,
I would like to find out the existence of files with wild card using CSH.
I have used the below code but does not seem to work.
Can any expert give me some advice ?
set nonomatch
set pattern = "_xxx"
set filetype = ( *$pattern* )
if ( -e $filetype) then
echo... (2 Replies)
Discussion started by: Raynon
2 Replies
5. Shell Programming and Scripting
have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies
6. Shell Programming and Scripting
I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile).
The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies
7. UNIX for Dummies Questions & Answers
I have a file named as Pro_PatAct_MMDDYYYY.csv. I need to renmae it to this Pro_PatAct.csv without the date timestamp. Can someone help me to achieve this using a regular expn. (3 Replies)
Discussion started by: imran_affu
3 Replies
8. Shell Programming and Scripting
Hi
Am trying to move a file from one name to another
When I do "ls" to check for the moved filename
I can see the file but when I try the same with a script am unable..
I think am doing some pretty silly error.. please help..
toMove=`ls | grep -E "partition.+"`
mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies
9. UNIX for Dummies Questions & Answers
Hi
I would like to rename Multiple files in a Unix Directory using Ksh Command.
Eg ATT8-2011-10-01 00:00:00-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
needs to be renamed as
ATT8-2011-10-01-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
Basically the time... (2 Replies)
Discussion started by: pchegoor
2 Replies
10. Shell Programming and Scripting
Hi experts,
I am new to perl.
I am trying to get the last file from set of files.
Using the below code; but getting error
pls help
Files:
-rw-r--r-- 1 abc abc 12584 Mar 18 16:22 /abc/def/ghi/xyz.HOSTNAME.2016.03.18.16.21.69709-6
-rw-r--r-- 1 abc abc 12623 Mar 18 16:25... (4 Replies)
Discussion started by: sdosanjh
4 Replies
LEARN ABOUT SUNOS
lurename
lurename(1M) System Administration Commands lurename(1M)
NAME
lurename - change the name of a boot environment
SYNOPSIS
/usr/sbin/lurename -e BE_name -n new_name [-l error_log] [-o outfile] [-X]
DESCRIPTION
The lurename command is part of a suite of commands that make up the Live Upgrade feature of the Solaris operating environment. See
live_upgrade(5) for a description of the Live Upgrade feature.
The lurename command renames the boot environment (BE) BE_name to new_name.
The string new_name must not exceed 30 characters in length and must consist only of alphanumeric characters and other ASCII characters
that are not special to the Unix shell. See the "Quoting" section of sh(1). The BE name can contain only single-byte, 8-bit characters. It
cannot contain whitespace characters. Also, new_name must be unique on the system.
A BE must have the status "complete" before you rename it. Use lustatus(1M) to determine a BE's status. Also, you cannot rename a BE that
has file systems mounted with lumount(1M) or mount(1M).
Renaming a BE is often useful when you upgrade the BE from one Solaris release to another. For example, following an operating system
upgrade, you might rename the BE solaris7 to solaris8.
The lurename command requires root privileges.
OPTIONS
The lurename command has the options listed below.
-e BE_name Name of the BE whose name you want to change.
-l error_log Error and status messages are sent to error_log, in addition to where they are sent in your current environment.
-n new_name New name of the BE. new_name must be unique on a given system.
-o outfile All command output is sent to outfile, in addition to where it is sent in your current environment.
-X Enable XML output. Characteristics of XML are defined in DTD, in /usr/share/lib/xml/dtd/lu_cli.dtd.<num>, where
<num> is the version number of the DTD file.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/etc/lutab
list of BEs on the system
/usr/share/lib/xml/dtd/lu_cli.dtd.<num>
Live Upgrade DTD (see -X option)
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWluu |
+-----------------------------+-----------------------------+
SEE ALSO
lu(1M), luactivate(1M), lucancel(1M), lucompare(1M), lucreate(1M), lucurr(1M), ludelete(1M), ludesc(1M), lufslist(1M), lumake(1M),
lumount(1M), lustatus(1M), luupgrade(1M), lutab(4), attributes(5), live_upgrade(5)
SunOS 5.10 24 Jan 2002 lurename(1M)