10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I need to write a shell script where I need to check whether log file is generated in last 1 hour or not. But I am getting below error in using mmin or cmin parameter with find command:
find: bad option -mmin
find: bad option -cmin
So my concern is that any alternative for mmin option... (5 Replies)
Discussion started by: Ankit Srivastav
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Please tell me what the below command wil do, according to my understanding it finds files in the current and sub directories whose modification time is 5 hrs and it dont zip the already zipped files who's size is more than 4K.
Am I Correct?
find . -type f -mmin +300 ! -name... (1 Reply)
Discussion started by: nag_sathi
1 Replies
3. Red Hat
This command used to work in my old Linux servers to delete old files (older than 2 days, in this case) but it suddenly not working at all--
find /path/to/dir/* -mtime 2 -exec rm {} \;
Anything I am missing? Would appreciate any tips.
Thanks! (6 Replies)
Discussion started by: pkiula
6 Replies
4. Shell Programming and Scripting
Hi,
I want to parameterise the argument for 'mmin' to find out files created/edited 'n' minutes ago.
For this i have written something as simple as the following:
n=10
m=-1
c=expr $n \* $m #value comes to -10 when echoed
find -mmin -10 #works
find -mmin $c #doesnt work ... (5 Replies)
Discussion started by: SheetalN
5 Replies
5. UNIX for Dummies Questions & Answers
Nuts and bolts:
I have a log file that should be updated once every minute called OD_MEM.log. I want to add a check to my CheckSystem script that confirms that the log has been written to in the last 2 minutes. If I use the find command with cmin 1, it finds the file every time. If I use the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
I've made some test with perl script to learn more about mtime...
So, my question is :
Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies
7. Shell Programming and Scripting
We have created a unix shell script to read a datafiles from specific input directory in Unix.
Users will be copying datafiles to the same input unix directoty.
During Testing we observed Unix Shell Script also read the incomplete datafiles which is still copying by the users.
As per requirement... (1 Reply)
Discussion started by: Kumari Reshma
1 Replies
8. Solaris
I have a piece of code (below) in a .ksh script running on AIX. I need to convert the code to run .zsh on Solaris. Solaris's find command does not support the -cmin function. Suggestions??
The code searchs for a file (_filename) and determines if it has been written to or modified in the last... (1 Reply)
Discussion started by: nmalencia
1 Replies
9. UNIX for Advanced & Expert Users
I am running SUSE/8 and SUSE/9 on a high end server (4 CPU, 8G RAM etc)
I have a huge directory structure with over 4million files in it. I have find the files that are modified (created, modified, renamed etc etc) in the last 10 minutes periodically.
I have tried "find -cmin -10" and "find... (2 Replies)
Discussion started by: xxxyyyy
2 Replies
10. UNIX for Dummies Questions & Answers
I wanna show all files like...one minute old, one hour old, five hours old and so on...
in my OS (HP-UX) there's only the command ..
find -name "..." -mtime -n
but this is only for days, there isn't something like -mmin -n ...just don't know what to do. also the newer than option isn't... (3 Replies)
Discussion started by: svennie
3 Replies