Sponsored Content
Full Discussion: Usage of find command
Top Forums UNIX for Dummies Questions & Answers Usage of find command Post 302603850 by ankush_mehra on Friday 2nd of March 2012 06:38:23 AM
Old 03-02-2012
Thanks for quick response. But I am woking on Live server where files are created evry second . So I need to retreive files created/Modified in last 3-4 hours.
I am using below command
find . -name "*_xyz" -prune -mtime <3-4hours> | wc -l
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

find command usage

I usually ise find to search a file or name on the unix, since I am not administrator, there will be many line appear 'cannot access',usually a hundred of lines. How can I prevent this line coming out? only show I want? The command I use is : find / -name abcdef -print Thank all expert. (1 Reply)
Discussion started by: zp523444
1 Replies

2. Programming

To find CPU Usage

I am programatically trying to find CPU usage for a particular process. I am writing a C program for this. I am not sure if my approach is good at all. I first of all find the PID using getpid() method. Then I call top -f <filename> and then parse to reach the PID row. I then try to read the 10th... (3 Replies)
Discussion started by: asutoshch
3 Replies

3. Solaris

Usage find command

is there any way to search the file using find command, so that it searches for the file considering the file name as case in-sensitive For example file name is AbcD.txt but i'm not sure of the file name just remember it was abcd.txt find / -name "abcd.txt" -print how do we go bout the... (2 Replies)
Discussion started by: raman1605
2 Replies

4. AIX

command usage on find with xargs and tar

my task : tar up large bunch of files(about 10,000 files) in the current directories that created more than 30 days ago but it come with following error find ./ -ctime +30 | xargs tar rvf test1.tar tar: test1.tar: A file or directory in the path name does not exist. (3 Replies)
Discussion started by: darkrainbow
3 Replies

5. UNIX for Dummies Questions & Answers

Disk Usage in GB and Unix command to find the biggest file/folder

Hi All, Please help me out 1) Command to find the disk usage in GB. I know that du -k will give in kilobites. 2) How to find the Biggest file/folder in a given set of files/folders. Thanks in advance Regards, Manas (8 Replies)
Discussion started by: manas6
8 Replies

6. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. UNIX for Dummies Questions & Answers

find usage with parameters

i have this basic piece of code to look for an aging file based on an input parameter. pfile=$1 pdir=`pwd` echo current directory $pdir for i in `find . "$pfile" -mtime +540` do echo aging files $i done # put a white space echo the above code works and gives me the listing of... (6 Replies)
Discussion started by: wtolentino
6 Replies

9. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

10. UNIX for Dummies Questions & Answers

Find command and multiple * usage

Please can i use: find /home/username/public_html/_sub/*/wp-content/*cache* -type f -delete command to empty all folders contianing "cache" in wp-content directory. issue is that in /home/username/public_html/_sub/ i have around 50 folders and i want to use this rule on all of them, so im... (3 Replies)
Discussion started by: postcd
3 Replies
BOS_PRUNE(8)						       AFS Command Reference						      BOS_PRUNE(8)

NAME
       bos_prune - Removes obsolete files from /usr/lib/openafs and /var/log/openafs

SYNOPSIS
       bos prune -server <machine name> [-bak] [-old] [-core]
	   [-all] [-cell <cell name>] [-noauth] [-localauth]
	   [-help]

       bos p -s <machine name> [-b] [-o] [-co] [-a]
	   [-ce <cell name>] [-n] [-l] [-h]

DESCRIPTION
       The bos prune command removes files from the local disk of the server machine named by the -server argument, as specified by one or more of
       the following flags provided on the command line:

       o   The -bak flag removes all files from the /usr/lib/openafs directory that have a ".BAK" extension.

       o   The -old flag removes all files from the /usr/lib/openafs directory that have a ".OLD" extension.

       o   The -core flag removes all files from the /var/log/openafs directory that have a "core." prefix.

       o   The -all flag removes all three types of files at once.

       (If none of these flags are included, the command appears to succeed, but removes no files at all.)

       To display the timestamp on the current, ".BAK", and ".OLD" versions of one or more files, use the bos getdate command.

OPTIONS
       -server <machine name>
	   Indicates the server machine from which to remove files. Identify the machine by IP address or its host name (either fully-qualified or
	   abbreviated unambiguously). For details, see bos(8).

       -bak
	   Removes all files from the /usr/lib/openafs directory that have a ".BAK" extension. Do not combine this flag and the -all flag.

       -old
	   Removes all files from the /usr/lib/openafs directory that have a ".OLD" extension. Do not combine this flag and the -all flag.

       -core
	   Removes all files from the /var/log/openafs directory that have a "core."  prefix. Do not combine this flag and the -all flag.

       -all
	   Combines the effect of the -bak, -old, and -core flags. Do not combine this flag with any of those three.

       -cell <cell name>
	   Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8).

       -noauth
	   Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see
	   bos(8).

       -localauth
	   Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket
	   to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see
	   bos(8).

       -help
	   Prints the online help for this command. All other valid options are ignored.

EXAMPLES
       The following example removes all files from the /usr/lib/openafs directory on the machine "fs3.abc.com" that have a ".BAK" or ".OLD"
       extension.

	  % bos prune -server fs3.abc.com -bak -old

       The following example removes all files from the /usr/lib/openafs directory on the machine "db2.abc.com" that have a ".BAK" or ".OLD"
       extension, and all files from the /var/log/openafs directory that have a "core."  prefix.

	  % bos prune -server db2.abc.com -all

PRIVILEGE REQUIRED
       The issuer must be listed in the /etc/openafs/server/UserList file on the machine named by the -server argument, or must be logged onto a
       server machine as the local superuser "root" if the -localauth flag is included.

       The bos prune command cannot be run against servers which are in restricted mode.

SEE ALSO
       KeyFile(5), UserList(5), bos(8), bos_getdate(8)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							      BOS_PRUNE(8)
All times are GMT -4. The time now is 03:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy