05-22-2013
Quote:
Originally Posted by
RudiC
Use signed numbers with all the time tests in find. man find:So, if you want to find files copied/modified within the last 120 minutes, use -120. Trying to find files dealt with EXACTLY 120 min ago, the result might be sparse.
The issue was i was using 120 rather than -120
thanks again
10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
10. 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
LEARN ABOUT DEBIAN
ocf_heartbeat_iscsi
OCF_HEARTBEAT_ISCSI(7) OCF resource agents OCF_HEARTBEAT_ISCSI(7)
NAME
ocf_heartbeat_iscsi - Manages a local iSCSI initiator and its connections to iSCSI targets
SYNOPSIS
iscsi [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION
OCF Resource Agent for iSCSI. Add (start) or remove (stop) iSCSI targets.
SUPPORTED PARAMETERS
portal
The iSCSI portal address in the form: {ip_address|hostname}[":"port] (required, string, no default)
target
The iSCSI target IQN. (unique, required, string, no default)
discovery_type
Target discovery type. Check the open-iscsi documentation for supported discovery types. (optional, string, default sendtargets)
iscsiadm
open-iscsi administration utility binary. (optional, string, default iscsiadm)
udev
If the next resource depends on the udev creating a device then we wait until it is finished. On a normally loaded host this should be
done quickly, but you may be unlucky. If you are not using udev set this to "no", otherwise we will spin in a loop until a timeout
occurs. (optional, string, default yes)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 120.
stop
Stops the resource. Suggested minimum timeout: 120.
status
Performs a status check. Suggested minimum timeout: 30.
monitor
Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 120.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5.
methods
Suggested minimum timeout: 5.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a iscsi resource using the crm(8) shell:
primitive p_iscsi ocf:heartbeat:iscsi
params
portal=string
target=string
op monitor depth="0" timeout="30" interval="120"
SEE ALSO
http://www.linux-ha.org/wiki/iscsi_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents UNKNOWN 03/09/2014 OCF_HEARTBEAT_ISCSI(7)