- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to change month from Jan ,Feb, to 01,02
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 08:07 PM
02-19-2002 08:07 PM
for example:use command ll-rw-rw-rw- 1 pin pin 10 Jan 16 17:03 zzz
if i wanna change Jan to 01,how can i do it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 08:19 PM
02-19-2002 08:19 PM
Re: how to change month from Jan ,Feb, to 01,02
By default that is how the output is presented. There is no options within 'ls' itself to change it. You could write a program wrapper that changes the output from the date presented to a number.
Only other thing I can suggest is have a look at 'Super ls'. You can find it at this link.
http://gatekeep.cs.utah.edu/hppd/hpux/Shells/sls-1.0/
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 08:50 PM
02-19-2002 08:50 PM
Re: how to change month from Jan ,Feb, to 01,02
ll | sed "s/Jan/01/g" | sed "s/Feb/02/g"
and so on for all the months.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 11:30 PM
02-19-2002 11:30 PM
Re: how to change month from Jan ,Feb, to 01,02
Put this in a script
exec $1|
sed -e 's/ Jan / 01 /'|
sed -e 's/ Feb / 02 /'|
sed -e 's/ Mar / 03 /'|
sed -e 's/ Apr / 04 /'|
sed -e 's/ May / 05 /'|
sed -e 's/ Jun / 06 /'|
sed -e 's/ Jul / 07 /'|
sed -e 's/ Aug / 08 /'|
sed -e 's/ Sep / 09 /'|
sed -e 's/ Oct / 10 /'|
sed -e 's/ Nov / 11 /'|
sed -e 's/ Dec / 12 /'
Then script command
ex script ll
Output comes with date changed
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2002 12:10 AM
02-20-2002 12:10 AM
Re: how to change month from Jan ,Feb, to 01,02
Regards,
Kenny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2002 01:20 AM
02-20-2002 01:20 AM
Solutiontry this:
ll | awk -v var=`date +"%e %m %X"` '{print $1, $2, $3, $4, $5, var, $7, $8, $9}'
date +%m gives you the desired format for the month.
You can make a little awk-script which is easier to call then.
Allways stay on the bright side of life!
Peter