General :: Find Argument List Too Long?

May 12, 2011

I want to search in many many files for a string.

I used find /archive/* -print0 | xargs -0 grep 'robert' -sl

Is there a simple method to do it ?

View 2 Replies


ADVERTISEMENT

General :: "Argument List Too Long" - Deleting Files Based On Grep?

Jan 28, 2011

I've got a directory with thousands of files and I want to delete those that contain specific text.When I try:Code: ls | grep -l "specific text" * | xargs rm I get the error: Code: /bin/grep: Argument list too long Is there an easy way to get around this without having to move files into seperate folders and processing them in batches? I found an article on getting around this problem, but I'm kind of new to Linux and don't know how to apply this to my specific problem.

View 3 Replies View Related

Ubuntu :: Large Number Of Files To Count - Argument List Too Long

May 28, 2011

I have the standard problem of trying to count a large number of files in a directory (>100k)

I have tried: ls ~/user/images/* -l | wc -l and find ~/user/images/* -maxdepth 1 -type f | wc -l

In both cases, I get the argument list too long error message.

I have tried using xargs but I can't seem to get it to work right.

The command

returns a valid answer but it includes all the subdirectories in the file count.

View 4 Replies View Related

General :: Sending Find Results To File - List Too Long

Aug 12, 2010

I'm trying to do a
find /photos/* -type f -mtime +365
to find all my pictures that are over a year old, but I keep getting argument list too long. How can I view what all the results are, even if it just dumps it to a file that I have to open?

View 12 Replies View Related

General :: Using Find With File Name And Mtime To Remove Files Gets Arg List Too Long Error?

Dec 25, 2009

I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.

find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;

View 3 Replies View Related

General :: Find All Child Processes Of A Parent Process Given To Script As Argument?

Feb 15, 2011

well i have just started with shell scripting...how to find all child processes of a parent process given to script as argument.

View 10 Replies View Related

Programming :: [bash] Option Followed By Argument List?

Feb 6, 2010

I'd like to pass the following arguments to a bash script in any order:

Code:
myscript -l <country> -r <file1> <file2> ... -o

I read the argument list in a switch shift loop. I figured out how to read the filelist but only if -f is the last option.

how to position the file list anywhere in the argument list?

View 5 Replies View Related

General :: Find Command Taking Too Long On Ubuntu 10.10

Aug 11, 2011

The find command is taking too long on my machine to complete. When I use time command, I find that sys time and user time are too small as compared to real time. Is my find process not getting scheduled properly?

I interrupted the neverending find command and got the following statistics:

Real time : 5min
Sys time : 1.1 sec
User time : 3 sec

I was running

find / -name ls 2>/dev/null

View 2 Replies View Related

Ubuntu Installation :: Get A Long List Of I/o Errors

Jan 20, 2010

The image disk boots OK and comes to the screen that gives the option to try or install. I opted for the "try Ubuntu" once, but got a long list of i/o errors. Tried the install option, and same thing. The install did get to an apparent Ubuntu background, but never any further prompts. Is the iso bad? I'm trying to install on a Dell Inspiron 7500. Currently has Win2000 loaded.

View 4 Replies View Related

Ubuntu Networking :: Long Wifi Networks Last In The Available List?

Mar 10, 2010

I was on a car trip earlier, but we were stuck in traffic. The stop-go stop-go kind of BS. I pulled out my 9.10 laptop and figured I'd scan for wifi networks and see how good America was at securing their networks. (I work in IT support so it's one of those things I preach to no end yet people rarely listen).

I was using wifi radar, and picked up a truckload of networks every time we'd stop. But something didn't sit well with me. When I click on the network manager icon in the top gnome panel to see what networks were available, it never seemed to refresh.

Example - the first 5 networks I saw were 1, 2, 3, 4, 5. We would stop-go more and more and miles later when I'd see more networks in the area show up in wifi radar, yet hit my network manager, I'd STILL see networks 1, 2, 3, 4, 5 and not 30, 31, 32, 33, etc like I expected.

What kind of refresh time or cache or whatever does network manager have? I just didn't understand why I was seeing the original networks from 15 minutes/miles ago and it never seemed to update.

View 1 Replies View Related

General :: Can't Find Bad Blocks List

Jan 6, 2010

I've got a new hard drive, formatted it to ext3, and made a check for bad blocks using e2fsck.

It gave me this:

Quote:

I just would like to know where i can find how many bad blocks were found (perhaps one if it is using singular in sentence "Updating bad block inode."?), and what is/are the number(s) of located bad block(s).

View 3 Replies View Related

General :: Find A List Of Rpm And Yum Apps?

Nov 13, 2010

I downloaded rpm so far but my only problem is I don't know what apps there are for it?

View 14 Replies View Related

Ubuntu :: Write A Base Script Which Will Divide An Argument By 10 And Then Use That Argument In Another Program?

Feb 23, 2010

I'm trying to write a base script which will divide an argument by 10 and then use that argument in another program. Since my argument can be a floating point number, I used bc to accomplish this. Here's an example of a simplified version of what I have so far:

<code>NUM=$(echo "scale=25;$1/10" | bc)
#make sure the first argument was formatted correctly
if [ $? -ne 0 ]

[code]...

View 4 Replies View Related

Ubuntu :: Find Execdir Convert -resize "find: Missing Argument To `-execdir'"

Feb 2, 2010

i'm trying to resize my album art that is dispersed through various artist/album folders. They are mostly 200x200, but i want to make all of them the same size. The code i'm trying to use is,

Code:

find -iname "cover.jpg" -execdir convert -resize 200x200 {}

or

Code:

find -iname "cover.jpg" -execdir convert {} -resize 200x200

i'm getting the error,

Code:

find: missing argument to `-execdir'

on both whats wrong with my syntax.

View 2 Replies View Related

General :: Find And List Files Created In A Particular Year?

Jan 31, 2011

How to find and list files and directories present the current directory which were created in, say, years 2005, 2006, and 2009 and then move them to some other location, for example, /backup. Yes, I need to list them and move simultaneously. We can use:

Code:

find . -mtime n {};

but that n is troublesome for me to figure out files/directories created in years 2005, 2006, and 2009, for instance. Is there any way to match exactly by Year Value rather than calulating the "n" (days * 24 Hours)?

System Info:

SunOS 5.8 Generic_117350-06 sun4u sparc SUNW,Ultra-Enterprise

View 3 Replies View Related

General :: Find A List Of Files That Are Named Duplicates ?

Jul 2, 2010

How can I find a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory?

View 7 Replies View Related

General :: Find A File And Just List The Found Files?

Aug 7, 2009

I use find / -name myfile to search files. But it will print out a very long list such as follow:

Code:

...
find: /var/empty/sshd: Permission denied
find: /etc/audit: Permission denied
find: /etc/httpd/conf/ssl.crl: Permission denied
find: /etc/httpd/conf/ssl.crt: Permission denied

[code]....

View 4 Replies View Related

General :: Find A List Of Cronjob Return Codes For Unix?

Jun 24, 2011

Where can i find a list of cronjob return codes for linux/unix

View 1 Replies View Related

General :: Rpm Naming Convention \ Find The List Of Distribution Codes?

Mar 17, 2011

Where would i find the list of distribution codes.For example.Code:samba-32bit-3.4.2 -1.1.3.1.x8664.rpmIn above rpm file it is indicated that its release is 1.1.3.1 .The rpm is meant to be run for opensuse.Where would i get the linking of release number and In simple words How would i guess distribution by merely looking at rpm name?

View 2 Replies View Related

General :: Find List Of Table Spaces In Oracle In Unix?

May 11, 2011

command to find list of table spaces in oracle in unix

View 1 Replies View Related

General :: Direction To Find A List Of Update Releases For Redhat System V5?

Feb 7, 2011

Would someone be able to point me in the direction to find a list of update releases for Redhat Linux v5?

View 1 Replies View Related

OpenSUSE :: Long List Of " The Following Package Updates Will Not Be Installed"?

Jul 9, 2010

When I run updates I get a long list of packages for which it says 'The following package updates will NOT be installed'. I'm wondering why not?

The only thing I can think of is I followed the guide in a sticky thread in the Multimedia forum to get codecs installed, and part of that is to change the vendor of some Opensuse packages to packman.

Code:
~> sudo zypper up
Retrieving repository 'openSUSE-11.2-Update' metadata [done]
Building repository 'openSUSE-11.2-Update' cache [done]
Retrieving repository 'packman' metadata [done]
Building repository 'packman' cache [done]
code....

View 7 Replies View Related

Ubuntu :: File System Check Failed A Long Is Being Saved /var/long/fsck/checkfs

Jan 9, 2010

just start Ubuntu 9.04 said: File system chek failed a long is beging saved /var/long/fsck/checkfs if that location is writable Please repair the file systmen manually A maintenance shell will now be started Ctr+ D terminate this shell and resume system boot. Give root password for maintenance or type Control +D to continue. I did Ctr+D , and after login said , that can not find /home. I starte with the live cd:

[Code]....

View 9 Replies View Related

General :: List/find All Regular Files In All Subdirectories Excluding Binary Files

Oct 5, 2010

I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find

View 4 Replies View Related

General :: Find Out A List Of RPMs Installed Using "force" Option?

Apr 12, 2011

I'm just wondering if there is an easy way I can generate a list of RPM packages which have been forcefully installed on the system (got a couple of servers transitioned).

All servers are RedHat-5 if that matters.

View 1 Replies View Related

General :: Using "find" To List Only Directories With No More Childs?

Oct 5, 2010

How can only directories be listed, that do not have another child directory?

Imagine a structure like /A /A/AA /A/AB /A/AB/ABB /B /C /C/CC /C/CC/CCC /C/CC/CCC/CCCC I would like to use find to list only /A/AA /A/AB/ABB /B /C/CC/CCC/CCCC.

The starting point would be find . -type d, but neither -mindepth nor -maxdepth can be used, can -noleaf help (I could not get it to react the way I wanted it to)?

View 2 Replies View Related

General :: Find Will Go Through The Content Of Tarball As Well And List All Content

Oct 5, 2010

I am using find to search for .tgz files modified more than 7 days ago and delete them.find /directory/ -iname backup*.tgz -daystart -mtime +7 -exec rm -rf {} My problem is that find will go through the content of tarball as well and list all content. I want to only search main tarball and delete it if older than 7 days.

View 4 Replies View Related

General :: Bash - Shell Utils: Convert A List Of Hex To List Of Decimals?

Dec 27, 2010

How can I convert a file with a lot hex numbers into the decimal?

Example: file1
0x59999
0x5acdc
0xffeff

I want to start $ cat file1 | util | cat >file2 and get file2 with smth like

[Code]...

View 3 Replies View Related

Ubuntu :: Find A List Of USB Devices?

Mar 2, 2010

Not long ago I lost all sound, but I got it back eventually-the system wasnt snesing my usb speakers.

Now its stopped recognising them again and I cant remember how I got it back before.

How do I find a list of USB devices?

View 7 Replies View Related

General :: Setting Tcp Ip Argument While Booting Up?

Nov 23, 2010

how to set the tcp ip parameter while linux boots up in my board.

Currently i am giving it like : tcp ip=:::::eth0:dhcp

If i have my own static ip and its corresponding mac-id can i change it for my board when i boot up.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved