Register
It is currently Sun Apr 22, 2018 9:54 pm

script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Sat Aug 19, 2017 1:20 am   

Joined: Sat Aug 19, 2017 1:17 am
Posts: 4
Write a shell script to find all *.log files modified in the last 3
days and print the number of lines for each file.


Top
 Profile  
 PostPosted: Sat Aug 19, 2017 8:02 am   

Joined: Mon Oct 20, 2014 9:53 am
Posts: 574
Code:
#!/bin/bash
find . -mtime 3 -a -iname '*.log' -exec   wc -l  {} \;


Top
 Profile  
 PostPosted: Sat Aug 19, 2017 12:43 pm   

Joined: Sat Aug 19, 2017 1:17 am
Posts: 4
Thanks . it works fine


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP