Sponsored Content
Top Forums UNIX for Advanced & Expert Users Find accessed file in past 1 or 2 minutes, and throw mail. Post 302135723 by varungupta on Wednesday 12th of September 2007 03:07:51 AM
Old 09-12-2007
Question

MYPATH="/clocal/mqbrkrs/user/mqsiadm/xyz/"
find "$MYPATH" -type f -amin -1 > tempfind.txt

In the above path I want to find the files which has been viewed/opened/touched/modified by any user in past 1 minute.
Viewed/opened/touched means file contents has been opened using more/cat/tail/head etc. commands.

find command that i am using, it shows the name of the file in which i have written the script (Means the script file only).

I have already checked the man find.
Can you guide me on this !!

Thanks !!Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files not accessed on a remote server and delete - Help!

Hi Guys, I am currently working on a script to find all the files that have not been accessed for the past 2 years. This, i guess has been discussed n number of times in this forum. Now, my requirement is to find all the files in the remote windows server. I have it mounted in unix. I was... (1 Reply)
Discussion started by: bond_bhai
1 Replies

2. Shell Programming and Scripting

Find the age of a file in Minutes

KSH: Please lt me know how to find the age of a file in minutes(Based on last modified time). ie, if the file was modified 15 Minutes ago, the output should be 15 (1 Reply)
Discussion started by: hari_anj
1 Replies

3. Shell Programming and Scripting

find files from the past 7 days

Hi All, I have a file which contains the listing of another directory: >cat list.dat -rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd -rwxrwxrwx 1 test staff 0 Oct 04 07:22 test.txx -rwxrwxrwx 1 test staff 132 Sep 16 2007 test_tt.sh... (6 Replies)
Discussion started by: deepakgang
6 Replies

4. Shell Programming and Scripting

Find Command in the script throw error

Hi I have script that is developed to serch for 30 days old Directory & Files and then remove them ... when i run it successfully removes the Directory & files & but it throw errors on the screen .. .. + find . -type f -mtime +30 -exec rm -f {} ; + exit please help me ?? I... (0 Replies)
Discussion started by: Beginner123
0 Replies

5. Shell Programming and Scripting

Log to find users who accessed server before

Hi, please provide the steps/commands to find out the user id list who accessed server before i logon same server. Thank you very much ffor all your support. (2 Replies)
Discussion started by: sridhardwh
2 Replies

6. UNIX for Advanced & Expert Users

How to find out last 5 users who have accessed a file?

Hi All, is there any command or script to find out last five users who have accessed a file thanks jcpratap (1 Reply)
Discussion started by: Jcpratap
1 Replies

7. UNIX for Beginners Questions & Answers

Find file that are accessed less than 10 minutes in a directory

Hi All,, I need to find the latest files that are accessed less than 10mins in a particular directory & send those files in an attachment. I could use the below simple one. But if the directory was not updated any recently i could mail the old file again, i need to eliminate that.. What shld... (8 Replies)
Discussion started by: Jeevitha
8 Replies

8. Shell Programming and Scripting

Grep a log file for the last 5 minutes of contents every 5 minutes

Hi all, System Ubuntu 16.04.3 LTS i have the following log INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042 INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Discussion started by: charli1
15 Replies

9. Shell Programming and Scripting

Check file creation Time minutes and if file older then 5 minutes execute some stuff

Hello all, Info: System RedHat 7.5 I need to create a script that based on the creation time, if the file is older then 5 minutes then execute some stuff, if not exit. I thought to get the creation time and minutes like this. CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
Discussion started by: charli1
3 Replies

10. UNIX for Beginners Questions & Answers

Find if create time of last created file in a directory is older than 5 minutes

A process xyz is running and creating file1, file2, file3, .... filen. how do i know if the process has stopped and createtime of the last file (filen) is older than 5 minutes? OS is AIX (3 Replies)
Discussion started by: malaika
3 Replies
pathconv(1F)							   FMLI Commands						      pathconv(1F)

NAME
pathconv - search FMLI criteria for filename SYNOPSIS
pathconv [-f] [-v alias] pathconv [-t] [-l] [-nnum] [-v string] DESCRIPTION
The pathconv function converts an alias to its pathname. By default, it takes the alias as a string from the standard input. OPTIONS
-f If -f is specified, the full path will be returned (this is the default). -t If -t is specified, pathconv will truncate a pathname specified in string in a format suitable for display as a frame title. This format is a shortened version of the full pathname, created by deleting components of the path from the middle of the string until it is under DISPLAYW -- 6 characters in length, and then inserting ellipses ( ... ) between the remaining pieces. Ellipses are also used to show truncation at the ends of the strings if necessary, unless the -l option is given. -l If -l is specified, < and > will be used instead of ellipses ( ... ) to indicate truncation at the ends of the string generated by the -t option. Using -l allows display of the longest possible string while still notifying users it has been truncated. -nnum If -n is specified, num is the maximum length of the string (in characters) generated by the -t option. The argument num can be any integer from 1 to 255. -valias |string If the -v option is used, then alias or string can be specified when pathconv is called. The argument alias must be an alias defined in the alias_file named when fmli was invoked. The argument string can only be used with the -t option and must be a pathname. EXAMPLES
Example 1: A sample that uses pathconv to construct the menu title. It searches for MYPATH in the alias_file named when fmli command. Here is a menu descriptor that uses pathconv to construct the menu title. It searches for MYPATH in the alias_file named when fmli was invoked: menu=`pathconv -v MYPATH/ls` . . . where there is a line in alias_file that defines MYPATH. For example, MYPATH=$HOME/bin:/usr/bin. Here is a menu descriptor that takes alias from the standard input. menu=`echo MYPATH/ls | pathconv` . . . ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
fmli(1), attributes(5) SunOS 5.10 5 Jul 1990 pathconv(1F)
All times are GMT -4. The time now is 08:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy