473,769 Members | 5,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get the same format for date in the ls command in hp UNIX

154 New Member
Hi when i run the unix command ls -l

I get a listing of folders but the formats are different and i need it to be 1 standard if possible please.

here is an example
drwxr-x--- 3 test test 8192 May 1 2007 monitor_scripts
drwxrwxr-x 12 test test 8192 Jul 11 2006 mozilla
drwxrwxr-x 6 test test 8192 Jun 29 2006 oraInventory
drwxrwx--- 3 test test 96 Jun 29 2006 oracle
-rw-r----- 1 test test 3259 Nov 1 09:36 sort_script.pl

so i need the time removed and to have all records to be a date.

Could somebody help me on how i could get 1 standard date format please.
Nov 1 '07 #1
2 3223
numberwhun
3,509 Recognized Expert Moderator Specialist
Hi when i run the unix command ls -l

I get a listing of folders but the formats are different and i need it to be 1 standard if possible please.

here is an example
drwxr-x--- 3 test test 8192 May 1 2007 monitor_scripts
drwxrwxr-x 12 test test 8192 Jul 11 2006 mozilla
drwxrwxr-x 6 test test 8192 Jun 29 2006 oraInventory
drwxrwx--- 3 test test 96 Jun 29 2006 oracle
-rw-r----- 1 test test 3259 Nov 1 09:36 sort_script.pl

so i need the time removed and to have all records to be a date.

Could somebody help me on how i could get 1 standard date format please.
That is just the way that the Unix date format is presented. If the date is (I think) withing a month, then it just puts the Month and day. Older than that and you get Month Day Year.

Regards,

Jeff
Nov 1 '07 #2
jonathan184
154 New Member
ok Thank you ............... ............... ............... .............

That is just the way that the Unix date format is presented. If the date is (I think) withing a month, then it just puts the Month and day. Older than that and you get Month Day Year.

Regards,

Jeff
Nov 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
4079
by: Rick | last post by:
I am going crazy on how to format a simple date. I have this in my MySQL table. "2005-03-10 08:44:21" and I want it to format out like "3/10/2005" or "03/10/05" but I seem to be going at it the wrong way. Here what I have but wow I get a wrong date. $cdate = date("r",$cdate); Please help!! I appreciate any help you can give. Rick
2
6971
by: Tatiana Zadiraka | last post by:
I use DB2 8.1 with FixPack 5. In command line for sql I get all DATE columns only in MM-DD-YYYY format. Of course, DATE('20-12-2003') gives me an error SQL0181N The string representation of a datetime value is out of range. SQLSTATE=22007 My db config is: Database territory = RU
6
31185
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date format exception (SQLSTATE=22007). The same queries worked fine on all the other workstations. The date format we want to use is "dd/mm/yyyy".After reinstalling several times the db2 runtime client w/ different options, we found on a technical forum...
5
4186
by: Jean-Marc Blaise | last post by:
Dear all, I have a table that contains a DATE in char(10) format. This table is LOADed. I put a check constraint on the column, some kind of CHECK (DATE(F) <= DATE('9999-12-31')) and I would like to move badly formatted field to the exception table. The problem is I will always get SQL0180N and the record is not moved into
4
7190
by: The Spoon | last post by:
I am looking for functions that can be used to automatically update the system date and time on an NT based system, resulting from manually entered date and time values input by an operator via a 32-bit console app. Any ideas?..I may have to look further afield at Win32 API's, etc but I wondered if there was any way to do it via C initially. Merry Xmas to all !!!
4
2488
by: hph | last post by:
Okay, another trivial matter that I can't solve. I have a variable - $lastdate - that is the latest date any record in a MySQL database was updated. Its MySQL format is TIMESTAMP. If I say I get the output I'd expect - 20060424221549 which is a YYYYMMDDHHMMSS format. I'd like to be able to display that using a format of mm/dd/yy with no leading spaces on the month and day. I don't know what the php command
12
2608
by: Rob Meade | last post by:
Hi all, Ok - I've come from a 1.1 background - and previously I've never had any problem with doing this: Response.Write (Session("MyDate").ToString("dd/MM/yyyy")) So, I might get this for example: 21/05/2006
6
34099
by: marc | last post by:
hi im trying to convert Date() into a unix timestamp so i can stick the result into a mysql db, please help!
3
5161
by: samuraisam | last post by:
FTP LST/LIST/NLST date field formatting function for all those seekers out there... import time import datetime def ftpdateformat(value): """Formats dates from most FTP servers""" if ":" in value: # within 6 months return datetime.datetime(
0
9583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10039
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.