Sponsored Content
Full Discussion: Listing times from ls
Top Forums Shell Programming and Scripting Listing times from ls Post 302538324 by jnagda on Tuesday 12th of July 2011 02:47:19 PM
Old 07-12-2011
Listing times from ls

Hello,
Im new to shell scripting and i am trying to write a part of my script
that will search for all files in any given folder
and write down all the names of the files and the atime, change time, and modtime of the files in one file as an output. I know that ls -l, ls -ul and ls -lc will give me the information i need, but is there a way to combine all three commands to have different columns for the different times?
Any help is appreciated!
Cheers,
Jeet
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. Shell Programming and Scripting

Question about times and so

I've got an logfile like: Start dump db_name1 : Wed Oct 30 15:08:47 MET 2002 Ready dump db_name1 : Wed Oct 30 15:14:46 MET 2002 Start dump db_name2 : Wed Oct 30 15:14:46 MET 2002 Ready dump db_name2 : Wed Oct 30 15:15:36 MET 2002 Start dump db_name3 : Wed Oct 30 15:15:36 MET 2002... (1 Reply)
Discussion started by: TheBlueLady
1 Replies

3. UNIX for Advanced & Expert Users

Boot times

Hey all, What we have at work is a Themis board (VME rack SPARC system). We have to try to have the boot time as fast as can be. What we have already done is make some filesystems read only so if power is lost then the filesystem check will not run. This is only done to the partitions that... (2 Replies)
Discussion started by: woofie
2 Replies

4. AIX

how would you know your server was rebooted 3 times or 5 times

Is there such location or command to know how many times did you reboot your server in that particular day?in AIX. (3 Replies)
Discussion started by: kenshinhimura
3 Replies

5. UNIX for Dummies Questions & Answers

comparing two times

Hi Good Morning all, I have two dates and times in the beloe format. 1. 07/18/2009 03:45:49 2. 07/18/2009 03:46:41 i will grep these values from a file. Now my problem is i need to find out whether the second valus is bigger thatn the 1 value. How to compare the times. Please help me in... (4 Replies)
Discussion started by: intiraju
4 Replies

6. Shell Programming and Scripting

Exit if between 2 times

Hello, I am working in Solaris 10 with a Bash script and trying to figure out how I can tell the script to look at the day of the week and the time and for example if it is Sat between 5:50am and 6:30am then just exit out of the script. Any other day or time keep running. We have a... (3 Replies)
Discussion started by: LRoberts
3 Replies

7. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

8. What is on Your Mind?

Welcome in these 1337 times

Have you noticed that the Unix time right now starts with the combination "1337"? 1337 times indeed. ;-)) bakunin (10 Replies)
Discussion started by: bakunin
10 Replies

9. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies
TV_SORT(1p)						User Contributed Perl Documentation					       TV_SORT(1p)

NAME
tv_sort - Sort XMLTV listings files by date, and add stop times. SYNOPSIS
tv_sort [--help] [--by-channel] [--output FILE] [FILE...] DESCRIPTION
Read XMLTV data and write out the same data sorted in date order. Where stop times of programmes are missing, guess them from the start time of the next programme on the same channel. For the last programme of a channel, no stop time can be added. Tv_sort also performs some sanity checks such as making sure no two programmes on the same channel overlap. --output FILE write to FILE rather than standard output --by-channel sort first by channel id, then by date within each channel. --duplicate-error If the input contains the same programme more than once, consider this as an error. Default is to silently ignore duplicate entries. The time sorting is by start time, then by stop time. Without --by-channel, if start times and stop times are equal then two programmes are sorted by internal channel id. With --by-channel, channel id is compared first and then times. You can think of tv_sort as converting XMLTV data into a canonical form, useful for diffing two files. EXAMPLES
At a typical Unix shell or Windows command prompt: tv_sort <in.xml >out.xml tv_sort in.xml --output out.xml These are different ways of saying the same thing. AUTHOR
Ed Avis, ed@membled.com perl v5.14.2 2006-03-02 TV_SORT(1p)
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy