Find command in Korn Shell

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find command in Korn Shell
# 1  
Old 11-09-2009
Find command in Korn Shell


I am trying to execute the below in Ksh (telnet)

find ./request.txt -mmin -30

It says

find: bad option -mmin

What i am trying to do is by using find command i am checking wheather the file request.txt is there for 30 minutes or not

Please help
# 2  
Old 11-09-2009
The version of find has more to do with the OS you have, than it does to do with the shell. find is an external (/usr/bin/find) command. You want files that
are less than 30 minutes old with a non GNU version of find:

This works
app> date
Mon Nov  9 13:57:57 MST 2009
app> touch -t 200911091257 dummy
app> find . -type f   ! -newer dummy -name request.txt

Note you need to specify a directory, not a filename
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Solved] How to refer more than 9 command line inputs for a scripts in korn shell?

Hi all, I have a script which should take more than 9 command line inputs while running. a s d f g h j j k l o p i u y t r e w Now in the script if I have to access one of the input which is at position after 9, in this case say 'p' then how can I do that? echo $12 will not work... (15 Replies)
Discussion started by: pat_pramod
15 Replies

2. Shell Programming and Scripting

Korn shell. wait command and crontab

I have the following ksh script: sqlplus usr1/pw1@DB1 @$DIR/a.sql $1 & sqlplus usr2/pw2@DB2 @$DIR/b.sql $1 & wait echo "Done!" Where $DIR is a variable with the absolute path where a.sql and b.sql are. For some time, I've been running this script daily and it works fine. The intentions is... (5 Replies)
Discussion started by: acarpio89
5 Replies

3. Shell Programming and Scripting

korn shell to cut command output

hello, i use following command: md5sum TEST.xml the output looks like: 900hjidur84hjr938ikv TEST.xml as you can see, the first part is the md5 code, the second part is the file name, but i only want the first part(md5 code), and save it to a file, how to do that? thanks. (2 Replies)
Discussion started by: zbc
2 Replies

4. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $ this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

5. Shell Programming and Scripting

Korn Shell Script to find out error in logfile

Hi All, I am new to this forum as well as to unix scripting. Can you please help me to create a korn shell script to find out errors in logfiles and get the name of that logfile ( which is having error) in email and email it to me? (2 Replies)
Discussion started by: jithu
2 Replies

6. UNIX for Dummies Questions & Answers

find and FTP multiple files in Korn Shell

I want to FTP multiple files in a directory that the files were created since midnight of the same day using korn shell. I can use the "find" command using -newer arguement that compares against a time stamp file. The script identifies the files, I can't use a variable = `find . ` as the... (2 Replies)
Discussion started by: lambjam
2 Replies

7. Shell Programming and Scripting

problem with set command in korn shell

I have to copy an array to a temp variable and back after doing some functions. I am trying to see if it is possible to do without while loops.My closest try was set -A temp ${THE_ARRAY} # restore array after some actions set -A THE_ARRAY ${temp} The problem with above is that, the new... (1 Reply)
Discussion started by: vijay1985
1 Replies

8. UNIX for Dummies Questions & Answers

Maximum Command Length for Korn shell

What is the maximum size of a command which can be given in telnet command prompt in unixfor Korn shell? (2 Replies)
Discussion started by: miltony
2 Replies

9. Shell Programming and Scripting

Command ignored after sftp - korn shell

Hi all Trying to run my korn shell script, I got no messages after the sftp. The "finished" msg is not being displayed. Any ideas? sftp $argument <<EOF quit EOF echo "finished" Thanks in advance, :O) (1 Reply)
Discussion started by: alienET
1 Replies

10. Shell Programming and Scripting

Need quick help with basic FIND in korn shell

I gotta make a script to find files, not quite sure whats wrong... filename is search i run it search ass* $HOME ass* is the filename and in my script i have... find $2 -name $1 -print but it never works, anyone know what i gotta fix? and does anyone know the difference... (6 Replies)
Discussion started by: Freakytah
6 Replies
Login or Register to Ask a Question