doubt in -prune option


 
Thread Tools Search this Thread
Operating Systems Linux doubt in -prune option
# 1  
Old 08-21-2009
MySQL doubt in -prune option

i want to find only the file t4 in directory t3. i am in dir t . the tree is as follows.

if i give,

find .
o/p is
.
./t4
./t1
./t1/t2
./t1/t2/t3
./t1/t2/t3/t4
./t1/t2/t4
./t1/t4

directories are like t/t1/t2/t3 and each directory has file t4.
my question is , i want to find file t4 inside directory t3 without looking in to the other sub directories.on for

how will i use -prune option for that?

i want an o/p like this:
./t1/t2/t3/t4
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Prune Option for Find Command on AIX

I need to delete all files from the working directory and its sub directories using the find command, for that I am using -prune option but some how I am having a syntax issue. I have tried the below, please help me correct the syntax find . -name \* -type f -exec rm -f {} \; >> Works but... (4 Replies)
Discussion started by: rosebud123
4 Replies

2. UNIX for Dummies Questions & Answers

find with prune option help needed

Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option. I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories. I have tried: find ${full_path_to_dir_to_search}... (9 Replies)
Discussion started by: gary_w
9 Replies

3. UNIX for Dummies Questions & Answers

AIX find command using prune option

Hi, I am trying to find some files in a directory and then remove/list them if they are 30 days old. I also have 2 directories in that directory which I need to skip. Can someone please tell me what is the correct syntax? find /developer/. -name "lost+found" "projects" -prune -o -type f... (2 Replies)
Discussion started by: tkhan9
2 Replies

4. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

5. Shell Programming and Scripting

help with find command and prune option

Hi I have a directory say mydir and inside it there are many files and subdirectories and also a directory called lost+found owned by root user I want to print all files directories and subdirectorres from my directory using find command except lost+found If i do find . \( -name... (3 Replies)
Discussion started by: xiamin
3 Replies

6. Shell Programming and Scripting

find with prune option

Hi, I want to list files only from the current dir and its child dir (not from child's child dir). i have the following files, ./ABC/1.log ./ABC/2.log ./ABC/ABC1/A.log ./ABC/ABC1/B.log ./ABC/ABC1/XYZ/A1.log ./ABC/ABC1/XYZ/A2.log Here i want to list only the log file from current... (1 Reply)
Discussion started by: apsprabhu
1 Replies

7. UNIX for Dummies Questions & Answers

help me out with find command , -prune option

Hi , Kindly help me out .:) i want to find only the file t4 in directory t3. i am in dir t . the tree is as follows. if i give, find . o/p is . ./t4 ./t1 ./t1/t2 ./t1/t2/t3 ./t1/t2/t3/t4 ./t1/t2/t4 ./t1/t4 directories are like t/t1/t2/t3 and each directory has file t4. my... (7 Replies)
Discussion started by: bhuvaneshlal
7 Replies

8. Solaris

correct usage of find's -prune option

I know one of the more seasoned veterans probably opened this thread looking for their chance to refer me to the site's search feature and let me tell you. I'VE LOOKED!!!! And I didn't find anything helpful... So, I've got a windows background and I'm fond of its search feature which comes... (6 Replies)
Discussion started by: ProGrammar
6 Replies

9. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

10. Shell Programming and Scripting

finding files using prune option

Hi All, I am trying to find files in a directory and don't want to search in the sub directories and using the command find . \( ! -name . -prune \) -mtime +1 -name '*.log' and is working fine. But when I am trying with absolute path then is not working like find /home/subodh \( ! -name... (1 Reply)
Discussion started by: subodh.sharma
1 Replies
Login or Register to Ask a Question
BOOTCHART(1)						      General Commands Manual						      BOOTCHART(1)

NAME
bootchart - render a chart from the statistical data recorded with bootchartd SYNOPSIS
bootchart [-f|--format FORMAT] [-n|--no-prune] [-o|--output-dir DIR] files ... DESCRIPTION
bootchart is used to process the log file created by bootchartd(1) (/var/log/bootchart.tgz by default). bootchart builds the process tree and renders a performance chart in different formats. The chart may then be analyzed to examine process dependency and overall resource utilization. OPTIONS
-f,--format FORMAT Sets the format of the image. Possible values are: png, eps, svg (default) -h, --help Display brief usage message. -n, --no-prune Do not prune the process tree. To make the resulting process tree more comprehensible, bootchart will prune the tree using various techniques (removing short-lived processes, merging processes, etc.). This option disables such behavior. -o, --output-dir DIR Sets the output directory for the resulting image. (default: .) -v, --version Show program version. FILES
/var/log/bootchart.tgz the default log file to parse (unless otherwise specified). SEE ALSO
bootchartd(1) AUTHOR
bootchart was written by Ziga Mahkovec <ziga.mahkovec@klika.si>. This manual page was written by Jorg Sommer <joerg@alea.gnuu.de>, for the Debian project (but may be used by others). 2006-03-05 BOOTCHART(1)