Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to get Date in format of mm/dd/yyyy from an ls command

Avatar of dhite99
dhite99 asked on
Unix OSShell Scripting
5 Comments1 Solution1106 ViewsLast Modified:
I hope there is a simple answer to this -

An ls -l bkup* produces the following
-rw-r-----   1 oracle   dba      63436611584 Jun 20 15:05 bkup_SGMMHC1_0cjjdijp_1_1

Is there some way to have ls print out the date in the form mm/dd/yyyy (or some variation of that date)?

Failing that, is there some way to extract the modification date from the file in a "usable" format or somehow convert the format above to a mm/dd/yyyy?

Failing THAT,  what's the best way to determine the oldest file between three (3) directories? For example, I need to determine which of these directories (/dbk1, /dbk2, /dbk3) has the "oldest" file that begins with "bkup*".

Any help would be most appreciated - thanks!
ASKER CERTIFIED SOLUTION
Avatar of Hanno P.S.
Hanno P.S.Flag of Germany imageIT Consultant and Infrastructure Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers