10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
2. Shell Programming and Scripting
Hi,
I am trying to compare epoch time in a huge log file (2 million lines) with todays date. I have to create two files one which has lines older than 10 days and another file with less than 10 days. I am using while do but it takes forever to complete the script. It would be helpful if you can... (12 Replies)
Discussion started by: shunya
12 Replies
3. OS X (Apple)
Hi there,
i do get some text files that i'd lile to clean them up based on following rule: if a line starts with " then remove return (new line, carriage return) before ".
Example, my input text file
line 1
line 2
"line 3
I'd like this to come as
line 1
line 2line3
How can i... (4 Replies)
Discussion started by: gigagigosu
4 Replies
4. Shell Programming and Scripting
I need to collect last 2 days data from /var/log/messages into a separate file (file format: flmessagetimedaymonth). I have collect today's month, date, time information in separate variable. Please help me in this issue (Probably need awk and grep function).
month=$(date|awk '{print $2}')... (4 Replies)
Discussion started by: makauser
4 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Problem Statement:Find all log files under all file systems older than 2 days and zip them. Find all zip files older than 3days and remove them. Also this has to be set under cron.
I have a concerns here
find . -mtime +2 -iname "*.log" -exec gzip {}
Not sure if this will work as... (4 Replies)
Discussion started by: saurabh.mishra
4 Replies
6. Shell Programming and Scripting
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies
7. Shell Programming and Scripting
I'm still new to bash script , I have a log file and I want to extract the items within the last 5 days . and also within the last 10 hours
the log file is like this : it has 14000 items started from march 2002 to january 2003
awk '{print $4}' < *.log |uniq -c|sort -g|tail -10
but... (14 Replies)
Discussion started by: matarsak
14 Replies
8. Shell Programming and Scripting
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Discussion started by: pdtak
6 Replies
9. Shell Programming and Scripting
I want to add these no. these are in the format of
days:hours:minutes:sec
I want result in this format only
0:00:04:59
0:00:00:12
0:00:00:28
0:00:00:03
0:01:29:35
0:00:00:19
0:01:05:21
Is any body ca help me?????
To get This..
Thanks
Nishant (1 Reply)
Discussion started by: krishna_sicsr
1 Replies
10. Shell Programming and Scripting
Hi Folks,
I have a log file that keeps the information pn the date and time a specific transaction is firedup. I found that the log file keeps growing and I intend to limit the entry to the log file to 30 days.
Log file name is transaction.log, here is the content:
120802_23:47:37 ... (3 Replies)
Discussion started by: odogbolu98
3 Replies