Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find . -name "*.*" | xargs grep "help" Post 302529442 by gary_w on Thursday 9th of June 2011 10:28:42 AM
Old 06-09-2011
redirect STDERR to /dev/null

To get rid of the permission errors with find, redirect its STDERR to /dev/null (the bit bucket when you don't care about the output).
Code:
find / -type d -name "dir_name" 2>/dev/null

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep and xargs

guys... I wanna use xargs in such a way that i can use it in grepping the fileds.. something like this: grep -p <xargs values> * lemme know how to do this.. (5 Replies)
Discussion started by: freakygs
5 Replies

2. UNIX for Dummies Questions & Answers

problem with grep in combination with xargs

Dear all, I have tried the following 2 lines xargs -t -i -exec grep -i -w {} file_1 >>test < file_2 cat -s file_2| xargs -t -i -exec grep -i -w {} file_1 >> test They were meant to search for the contents of file_2 in file_1 and write the respective lines of file_1 into file "test" .... (15 Replies)
Discussion started by: Bruno
15 Replies

3. UNIX for Dummies Questions & Answers

XARGS and FIND together

I am trying to delete files older than 60 days from a folder: find /myfolder/*.dat -mtime +60 -exec rm {} \; ERROR - argument list too long: find I can't just give the folder name, as there are some files that I don't want to delete. So i need to give with the pattern (*.dat). I can... (3 Replies)
Discussion started by: risshanth
3 Replies

4. Shell Programming and Scripting

find and xargs

hi, i've been trying to figure this weird error but I cannot seem to know why. I am using below find command: find . \( ! -name . -prune \) -type f -mtime +365 -print The above code returns no file because no files are really more then 365 days old. However, when I use xargs, its... (9 Replies)
Discussion started by: The One
9 Replies

5. Shell Programming and Scripting

File find | xargs grep for pattern file

Folks I've been struggling this with for far too liong now and need your help! I've been happily using grep for a search of a directory, to list the files which contain a string: find . -type f -mtime -5 -print | xargs grep -l 'invoiceID=\"12345\"' Now the list of 'invoiceID' I am... (4 Replies)
Discussion started by: daveaasmith
4 Replies

6. Shell Programming and Scripting

Xargs + Find Help

Guys i want to run a command to list all directories that havn't been modified in over 548 days ( 1.5 yrs ). Id like to run a script to first print what the command finds ( so i get a list of the files pre move ... i have a script set for this : find /Path/Of\ Target/Directory/ -type d -mtime... (4 Replies)
Discussion started by: modulartention
4 Replies

7. Shell Programming and Scripting

Find common terms in two text file, xargs, grep

Hello, I'm interested in finding all occurrences of the terms in file1 in file2, which are both csv files. I can do this with a loop but I'm interested in knowing if I can also do it with the help of xargs and grep. What I have tried: cat file1 | xargs grep file2 The problem is that... (15 Replies)
Discussion started by: eon
15 Replies

8. UNIX for Dummies Questions & Answers

find/xargs/*grep: find multi-line empty "try-catch" blocks - eg, missing ; not in a commented block

How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases? This would seem to involve find, xargs, *grep, regex, etc. In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies

9. Shell Programming and Scripting

Help with find, xargs and awk

Hi, I want to find some files and then search for some lines in it with a particular pattern and then write those lines into a file. To do this I am using something like this from command prompt directly. cd /mdat/BVG find -name "stmt.*cl" -newer temp.txt | xargs -i awk '/BVG-/{print}' {} >... (7 Replies)
Discussion started by: Sandhya Harsh
7 Replies

10. Shell Programming and Scripting

Looping grep and xargs

In a directory I have two lists, all files which could contain certain fields (they all share copied code) and a list of fields. My two scripts are <appl.list xargs grep $1 where appl.list contains files (source programs) with the fields. This script is named YY <fields.list xargs YY ... (4 Replies)
Discussion started by: wbport
4 Replies
BUS_RELEASE_RESOURCE(9) 				   BSD Kernel Developer's Manual				   BUS_RELEASE_RESOURCE(9)

NAME
bus_release_resource -- release resources on a bus SYNOPSIS
#include <sys/param.h> #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> #include <machine/resource.h> int bus_release_resource(device_t dev, int type, int rid, struct resource *r); DESCRIPTION
Free a resource allocated by bus_alloc_resource(9). The resource must not be in use on release, i.e., call an appropriate function before (e.g. bus_teardown_intr(9) for IRQs). dev is the device that owns the resource. type is the type of resource that is released. It must be of the same type you allocated it as before. See bus_alloc_resource(9) for valid types. rid is the resource ID of the resource. The rid value must be the same as the one returned by bus_alloc_resource(9). r is the pointer to struct resource, i.e., the resource itself, returned by bus_alloc_resource(9). RETURN VALUES
EINVAL is returned, if the device dev has no parent, 0 otherwise. The kernel will panic, if it cannot release the resource. EXAMPLES
/* deactivate IRQ */ bus_teardown_intr(dev, foosoftc->irqres, foosoftc->irqid); /* release IRQ resource */ bus_release_resource(dev, SYS_RES_IRQ, foosoftc->irqid, foosoftc->irqres); /* release I/O port resource */ bus_release_resource(dev, SYS_RES_IOPORT, foosoftc->portid, foosoftc->portres); SEE ALSO
bus_alloc_resource(9), device(9), driver(9) AUTHORS
This manual page was written by Alexander Langer <alex@big.endian.de>. BSD
May 18, 2000 BSD
All times are GMT -4. The time now is 08:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy