Sponsored Content
Full Discussion: find question
Top Forums UNIX for Dummies Questions & Answers find question Post 11584 by doeboy on Friday 7th of December 2001 05:59:49 PM
Old 12-07-2001
They should work. You have to use -a or -o in between the conditions you specify. (-a for and; -o for or) For example:

find ( -atime 31 ) -a ( -name \*.log ) -exec rm -f {} \;

I'm not sure if the syntax is 100% correct (I didn't test this) but I've done stuff similar to that before in scripts, where I strung like 10 or 11 different conditions on one find command.

Smilie Smilie

Hope this helps
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find ...question.

:D i am looking through the man pages of the find command and I have found the -printf and fprintf section.. . I tried this command and got an error find -follow -newer 'date.file' -printf %f file1 i keep getting a %f in directory listing and no input into file1 according to the manpages %f... (2 Replies)
Discussion started by: moxxx68
2 Replies

2. Shell Programming and Scripting

Question on Find Utility

Hi Guys, Do you know how can I find files with modificatioin time less than 30 MINUTES using the find utility? Or if u have any other mechanism to find it using script, I'll appreciate it. Thanks! (5 Replies)
Discussion started by: marlonus999
5 Replies

3. UNIX for Dummies Questions & Answers

Question about 'find'

I have a file, but I don't know this file is stored in which directory, if I use 'find' command to search this file, is it work? which option I use? find filename? (2 Replies)
Discussion started by: wendyz
2 Replies

4. Shell Programming and Scripting

find . -name question

Not sure if I'm missing it, but I'm looking on the find man page, but can't find it. Here is what I'm doing find . -name "log_*" -type f -mtime +8 -exec rm {} \; How do I tell man to find all files matching that pattern, but only ones that end with a numeric character. I thought it was... (4 Replies)
Discussion started by: cbo0485
4 Replies

5. Shell Programming and Scripting

'find' question

hey guys! I need to find in a specific directory and its sub-directories a file thats passed has a argument, and print it has like a ls -l command! the problem is how do i print has a ls command but instead only the file name in the end, also the directory where its insered! ex: Want... (2 Replies)
Discussion started by: Shinni
2 Replies

6. UNIX for Dummies Questions & Answers

Dumb find question

All, For some reason I can't figure out why I can't wildcard my find statement to check for anything with a wildcard after. I can before the -name but not after. ie. find . -name *test works but find . -name test* gives me the error: find: paths must precede expression Usage: find ... (1 Reply)
Discussion started by: markdjones82
1 Replies

7. UNIX for Dummies Questions & Answers

Find Command Question

I was using this find command to search for this string find /usr/reports -name '*.txt' -type f -exec grep -l tbl_out:add_19 {} \; > /usr/work/junk.txt My question is, if I want to search another type of file extension besides '*.txt' how can I include it on the same line to say something... (5 Replies)
Discussion started by: NycUnxer
5 Replies

8. Shell Programming and Scripting

find command question

Hi all, I want to use find to 'find' files older than a file. The command I have come up with so far is find . -type f ! -newer filename -print | grep -v filename If I dont use the -v then the filename is included in the output is there a better way of formulating this command... (1 Reply)
Discussion started by: jonnyd
1 Replies

9. UNIX for Dummies Questions & Answers

A question on find command

I need to find all files with file names starting with alert and ending with .log I mean, the following files should be returnrned alertTST.log alertabcdefgh.log How can i do this ? (4 Replies)
Discussion started by: kraljic
4 Replies

10. UNIX for Dummies Questions & Answers

Question on ls and find

Hi, Is there an option to run ls to only show files owned by the current user? Currently doing ls | awk | grep for the user. If I use find and -user ${username}, I am getting Permission denied messages on some directories and am currently re-directing those messages as 2>/dev/null. Is that... (2 Replies)
Discussion started by: newbie_01
2 Replies
DH-EXEC-SUBST(1)						      dh-exec							  DH-EXEC-SUBST(1)

NAME
dh-exec-subst - Debhelper executable file substition scripts SYNOPSIS
#! /usr/bin/dh-exec src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/ DESCRIPTION
Being a sub-command of dh-exec(1), this program must not be ran directly, but through dh-exec, which automatically runs all available sub-commands if run bare; or explicitly with dh-exec --with=subst. It is a wrapper around the various other substitution helpers, and will pipe the input file through all the available substitution helpers. It is up to these scripts to do the actual work. When a helper fails to expand a variable within its input, it will leave it as-is, so that later in the pipeline it can perhaps be expanded by another program. SCRIPTS
dh-exec-subst-env Substitutes any of the available, exported environment variables into its input. It does not do any kind of filtering: whatever is available in the environment, will be available for substitution, however unsafe that may be. dh-exec-subst-multiarch Attempts to expand any of the variables known to dpkg-architecture(1), mostly useful for multi-arch support. The command will query dpkg-architecture(1) directly, and does not rely on environment variables set (as the called program will prefer already set environment variables anyway). ENVIRONMENT
DH_EXEC_SCRIPTDIR Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in /usr/share/dh-exec/. FILES
$DH_EXEC_SCRIPTDIR/dh-exec-subst-* The various scripts for the higher-level program. SEE ALSO
debhelper(1), dh-exec(1) AUTHOR
dh-exec-subst is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>. 2012-05-03 DH-EXEC-SUBST(1)
All times are GMT -4. The time now is 01:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy