Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Listing files from October 4th is not accurate Post 303024446 by alexcol on Monday 8th of October 2018 10:26:11 PM
Old 10-08-2018
Listing files from October 4th is not accurate

Good evening:
Need your help please

Before deleting older logs from octobre 4th i need to identify which files i have to remove, for instance today is octobre 8ht, i need to remove files from October 4th

Because there are many files i can not list because error args too long, so

Code:
/produccion/explotacion/xpfactur/facturacion/log/CRMLogs/nociclo # ls|wc -l
500318

Thos is the command:

Code:
find ./ -mtime +4 -name "Impres*.log" -type f -exec ls -lrt {} \;|more

output:

Code:
rw-r--r--   1 xpfactur explotacion  945067 Sep 25 01:00 ./CRMLogs_11583846.log
-rw-r--r--   1 xpfactur explotacion  927900 Sep 25 01:00 ./CRMLogs_11605696.log
-rw-r--r--   1 xpfactur explotacion  922556 Sep 25 01:00 ./CRMLogs_11591810.log
-rw-r--r--   1 xpfactur explotacion  945192 Sep 25 01:00 ./CRMLogs_11631276.log
-rw-r--r--   1 xpfactur explotacion  922258 Sep 25 01:00 ./CRMLogs_11559556.log

above just list files from september 25th, but files from octuber 4rth really exists when i use this command:

Code:
SCEL /produccion/explotacion/xpfactur/facturacion/log/CRMLogs/nociclo # find ./ -name "CRMLogs*" -type f -mtime -7 -exec ls -l {} \;|more
-rw-r--r--   1 xpfactur explotacion  122108 Oct  4 09:45 ./CRMLogs_11824221.log.gz
-rw-r--r--   1 xpfactur explotacion  122149 Oct  4 10:01 ./CRMLogs_11824388.log.gz
-rw-r--r--   1 xpfactur explotacion  122068 Oct  3 11:51 ./CRMLogs_11814440.log.gz
-rw-r--r--   1 xpfactur explotacion  121271 Oct  3 15:25 ./CRMLogs_11817732.log.gz
-rw-r--r--   1 xpfactur explotacion  121857 Oct  3 16:53 ./CRMLogs_11819599.log.gz
-rw-r--r--   1 xpfactur explotacion  122364 Oct  4 11:19 ./CRMLogs_11825342.log.gz
-rw-r--r--   1 xpfactur explotacion  122101 Oct  4 12:07 ./CRMLogs_11826156.log.gz
-rw-r--r--   1 xpfactur explotacion  123191 Oct  4 12:09 ./CRMLogs_11826190.log.gz
-rw-r--r--   1 xpfactur explotacion  123294 Oct  4 12:14 ./CRMLogs_11826738.log.gz
-rw-r--r--   1 xpfactur explotacion  122536 Oct  4 12:18 ./CRMLogs_11827227.log.gz
-rw-r--r--   1 xpfactur explotacion  121686 Oct  4 12:24 ./CRMLogs_11827749.log.gz
-rw-r--r--   1 xpfactur explotacion  122314 Oct  4 12:28 ./CRMLogs_11828380.log.gz
-rw-r--r--   1 xpfactur explotacion  122155 Oct  4 14:29 ./CRMLogs_11830152.log.gz
-rw-r--r--   1 xpfactur explotacion  121209 Oct  4 17:20 ./CRMLogs_11832826.log.gz
-rw-r--r--   1 xpfactur explotacion  122128 Oct  4 18:21 ./CRMLogs_11834403.log.gz
-rw-r--r--   1 xpfactur explotacion  122126 Oct  4 18:21 ./CRMLogs_11834425.log.gz
-rw-r--r--   1 xpfactur explotacion  122357 Oct  4 18:38 ./CRMLogs_11834942.log.gz
-rw-r--r--   1 xpfactur explotacion  122341 Oct  4 18:59 ./CRMLogs_11835504.log.gz
-rw-r--r--   1 xpfactur explotacion  121782 Oct  8 00:28 ./CRMLogs_12031105.log.gz
-rw-r--r--   1 xpfactur explotacion  121780 Oct  8 00:29 ./CRMLogs_12031056.log.gz
-rw-r--r--   1 xpfactur explotacion  121213 Oct  4 23:32 ./CRMLogs_11837553.log.gz
-rw-r--r--   1 xpfactur explotacion  121458 Oct  4 23:36 ./CRMLogs_11838724.log.gz
-rw-r--r--   1 xpfactur explotacion  121468 Oct  4 23:42 ./CRMLogs_11838186.log.gz


how to get around this to list excactly logs from October 4th ?

the opartating system is:

Code:
SunOS serber100c 5.10 Generic_144488-01 sun4u sparc SUNW,SPARC-Enterprise


I appreciate your help in advanced
 

8 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. Linux

Listing of files

How can I list all files in a directory and its subdirectories that have been created or changed since the system was booted. I was trying to acomplish this with "ls" and "find" commands but could not get anything usefull. Maybe some one can provide me a hint. Thank you for your time. (1 Reply)
Discussion started by: Vitalka
1 Replies

3. UNIX for Advanced & Expert Users

listing files excluding files from control file

I have a directory named Project.I have a control file which contains valid list of files.I would like list the files from directory Project which contains files other than listed in the control file. Sample control file: TEST SEND SFFFILE CONTL The directory contains followign... (15 Replies)
Discussion started by: ukatru
15 Replies

4. Shell Programming and Scripting

perl script for listing files and mailing the all files

Hi, I am new to perl: I need to write perl script to list all the files present in directory and mail should be come to my inbox with all the files present in that directory. advanced thanks for valuable inputs. Thanks Prakash GR (1 Reply)
Discussion started by: prakash.gr
1 Replies

5. SuSE

Listing files

Hi, This may be silly for some of you guys, but please guide me, I have the followin fies in my directory, root@unix:/onlineredo/XTT77 : ls -l total 4129992 -rw------- 1 XTT77 XTT77 10493952 Jul 28 2010 S0106839.LOG -rw------- 1 XTT77 XTT77 10493952 Jul 28 2010 S0106840.LOG... (3 Replies)
Discussion started by: suren1829
3 Replies

6. Shell Programming and Scripting

Output is not Accurate

list db directory |grep alias |awk '{print "connect to ",$4}' In a shell script the below line should display output as below connect to <DATABASENAME> but its throwing error like Syntax Error The source line is 1. The error context is {print connect to,... (8 Replies)
Discussion started by: rocking77
8 Replies

7. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

8. UNIX for Beginners Questions & Answers

Compress and logging files from October 6th in a loop

Good night, i need your help please Because there are about 10000 files from October 6th, i need to to compress but i use this command and it does not do anything, in the prompt has no respones and i have to press CRTL+C to goback to the shell for file in $(ls -l | grep "Impres" | grep "Oct ... (4 Replies)
Discussion started by: alexcol
4 Replies
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy