Sponsored Content
Top Forums Shell Programming and Scripting List files and display last modify time in a particular format Post 302385794 by gaurav1086 on Saturday 9th of January 2010 11:01:07 PM
Old 01-10-2010
Hello Deane,

watch below->

Code:
gaurav@localhost:~$ ls perl_code/
1a.pl          circle.pl    extract.pl    list.pl                      new_boy.pl   parse.pl          simple.pl   sub.pl   while_undef.pl
1.pl           core.pl      file.txt      match.pl                     new_cgi.cgi  pdf1.pl           sor.pl      test     xop.pl
anew           count.pl     first.html    Module-CoreList-2.17         newd.pl      place_holders.pl  spider.pl   tree.pl
backup.pl      dab2.pl      glob.pl       Module-CoreList-2.17.tar.gz  new_.html    radio-cgi.cgi     split.pl    tt
base.pl        data.pl      hello.pl      my_first.html                odd.pl       radio.html        sub1.pl     tt.tar
cgi_first.cgi  dbi_main.pl  htmlparse.pl  mymodule                     one.cgi      rev.pl            submit.cgi  up.pl
gaurav@localhost:~$ ls -l perl_code/ | perl -ln -e 'split(/\s+/);@f1=split("-",$_[5]),@f2=split(":",$_[6]);print @f1,@f2,"\t",$_[7]'
	
200907231348	1a.pl
200907231324	1.pl
200908221347	anew
200907150024	backup.pl
200907230324	base.pl
200907291235	cgi_first.cgi
200907101449	circle.pl
200907231345	core.pl
200907101445	count.pl
200907261412	dab2.pl
200907261413	data.pl
200907270135	dbi_main.pl
200908281739	extract.pl
200907140919	file.txt
200907291425	first.html
200907150029	glob.pl
200907101434	hello.pl
200908221149	htmlparse.pl
200907141042	list.pl
200907140822	match.pl
200907231214	Module-CoreList-2.17
200907231204	Module-CoreList-2.17.tar.gz
200908221430	my_first.html
200907231306	mymodule
200907270102	new_boy.pl
200907291422	new_cgi.cgi
200907261436	newd.pl
200908221341	new_.html
200907181414	odd.pl
200908081353	one.cgi
200908281735	parse.pl
200908270347	pdf1.pl
200907270051	place_holders.pl
200908081344	radio-cgi.cgi
200907300801	radio.html
200907101557	rev.pl
200908241451	simple.pl
200907101600	sor.pl
200908261616	spider.pl
200907140829	split.pl
200907121711	sub1.pl
200908081339	submit.cgi
200907180745	sub.pl
200907150025	test
200908221448	tree.pl
200909011628	tt
200909011630	tt.tar
200907101433	up.pl
200907131140	while_undef.pl
200907101456	xop.pl
gaurav@localhost:~$

now check with yours. you have to pipe the list of files(long listing i.e. 'ls -l') of some directory that you want.
Regards.
Gaurav.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need year to display from ftped files list

Hi All, p_ftp=dummy time ftp -niv 192.0.0.2 << EOF user dummy dummy cd prt/$p_ftp ascii ls -ltr quit output is -rw-r--r-- 1 500 500 5137 Mar 04 11:21 dummy.csv can any one suggest how to get year while using ftp (1 Reply)
Discussion started by: Vrgurav
1 Replies

2. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

I have a file named "suspected" with series of line like these : {'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''} {'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies

3. UNIX for Dummies Questions & Answers

Find files and display only directory list containing those files

I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file. I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies

4. Shell Programming and Scripting

how to format a list of files from ls?

Hi, I have am looking for advice on how to format a directory listing... Basically, I have a list of speech voices at /System/Library/speech/voices This directory looks like: Agnes.SpeechVoice Albert.SpeechVoice Alex.SpeechVoice .. etc I would like to print these out by splitting by... (6 Replies)
Discussion started by: patrick99e99
6 Replies

5. Shell Programming and Scripting

modify a format

Hi I have a format that looks like this: #TailType TwoSided #Scale to target True #Target Intensity 100 #Intensities PM/MM #Treatment CEL ./G.CEL #Control CEL ./F.CEL chr1 16 0 chr1 24 0 chr1 32 0.187188 chr1 40 0.14595 chr1 ... (5 Replies)
Discussion started by: kylle345
5 Replies

6. Shell Programming and Scripting

Modify different files at the same time

Hi, I'm having the following problem. I have some files to modify, between a large number of files. I thought the following code aux2=`grep -l 2.2.17 *` print "$aux2" aux3=`ls -l *.ksh | wc -l` print "$aux3" while ; do print "The counter is $aux3" #Add the sed here ... (3 Replies)
Discussion started by: radicaled
3 Replies

7. Shell Programming and Scripting

Display files created on particular date & time

Hi , I have BASH system & i am trying to display the files created on a particular date and time, and after displaying those files I also want to delete all those files.Can anyone of you help me out for this............. Thanx Original post contents restored... Please do not erase the question... (3 Replies)
Discussion started by: rakeshtomar82
3 Replies

8. Shell Programming and Scripting

Help to modify in Excel format

Hi I ran some query in solaris machine and the result of the query is as below. Result: dn: uid=xxx,dc=example,dc=com id: xxx firstname: sam lastname: nam But my question is , how to get result in excel format in solaris and result attributes dn,id,firstname,lastname values ... (1 Reply)
Discussion started by: buzzme
1 Replies

9. Shell Programming and Scripting

Long list file display different time format.

Hi Gurus, I have some weird issue. when using ls -l the result shows different time format: -rw-r--r-- 1 abc gourp1 3032605576 Jun 14 2013 abc -rw-rw-r-- 1 abc gourp1 1689948832 Aug 10 06:22 abc one display 2013 which is year; another one displays 06:22 which is time. ... (4 Replies)
Discussion started by: ken6503
4 Replies

10. Post Here to Contact Site Administrators and Moderators

Display time in 12 hr format

Write a script named time that displays the time in standard 12-hour format, rather than 24-hour format. Allow the user to give a -m option to get 24-hour format. For example: > date Sun Feb 10 10:56:50 CST 2008 > time 10:56 AM > date Sun Feb 10 21:57:07 CST 2008 > time 9:57 PM >... (0 Replies)
Discussion started by: satish24
0 Replies
suninstall(1M)						  System Administration Commands					    suninstall(1M)

NAME
suninstall - install the Solaris operating system SYNOPSIS
suninstall DESCRIPTION
install-solaris(1M) is now the preferred command for starting and restarting the Solaris Installation program. It should be used instead of suninstall. suninstall is symbolically linked to install-solaris. suninstall is a forms-based and graphical subsystem for installing the operating system. suninstall exists only on the Solaris installation media (CD or DVD) and should only be invoked from there. Refer to the Solaris 10 Instal- lation Guide: Basic Installations for more details. suninstall allows installation of the operating system onto any standalone system. suninstall loads the software available on the installa- tion media. Refer to the Solaris 10 Installation Guide: Basic Installations for disk space requirements. USAGE
Refer to the Solaris 10 Installation Guide: Basic Installations for more information on the various menus and selections. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ SEE ALSO
pkginfo(1), install(1M), install-solaris(1M), pkgadd(1M), attributes(5) Solaris 10 Installation Guide: Basic Installations NOTES
It is advisable to exit suninstall by means of the exit options in the suninstall menus. SunOS 5.10 9 Sep 2004 suninstall(1M)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy