Sponsored Content
Top Forums Shell Programming and Scripting find with xargs to rm found files Post 302444173 by rajamadhavan on Wednesday 11th of August 2010 05:39:29 AM
Old 08-11-2010
Is your rm aliased to rm -i ? did you try rm -rf instead of just rm..?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find command in while loop - how to get control when no files found?

I have the following statement in script: find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do ... done When there are no files located by the find comand it returns: "find: bad status-- /home/rnitcher/test/....." to the command line How do I get control in... (3 Replies)
Discussion started by: mavsman
3 Replies

2. Shell Programming and Scripting

Problem using find and xargs

I'm using Imagemagick to create thumbnails for a large directory tree. The only thing I can't see is how to get it to write the thumbnails to a "thumbs" subdirectory! Either of these two commands from the Imagemagick site does most of the job: find -name '*.jpg' | xargs -n1 sh -c 'convert $0... (5 Replies)
Discussion started by: quixote
5 Replies

3. Shell Programming and Scripting

print as well as count the files found by find command

I want the output of the find command to be printed and also the total files found by it. Can someone help in this. Obviously $ find . -type f | wc -l will not output the files found but only the count. I want both. There can be millions and trillions of files so dont want the output of find... (3 Replies)
Discussion started by: amicon007
3 Replies

4. Shell Programming and Scripting

find | xargs cat

Hi, I am having trouble getting a combination of commands to work. I need to traverse through all sub-directories of a certain directory and 'cat' the contents of a particular file in the sub-directories. The commands on their own work but when I combine them I get no output. The... (4 Replies)
Discussion started by: DownunderDave
4 Replies

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

help using find/xargs to apply mp3gain to files

I need to apply mp3gain (album mode) to all mp3 files in a given directory. Each album is in its own directory under /media/data/music/albums for example: /media/data/music/albums/foo /media/data/music/albums/bar /media/data/music/albums/more What needs to happen is: cd... (4 Replies)
Discussion started by: audiophile
4 Replies

9. 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

10. Shell Programming and Scripting

Fast processing(mv command) of 1 million+ files using find, mv and xargs

Hi, I'd like to ask if anybody can help improve my code to move 1 million+ files from a directory to another: find /source/dir -name file* -type f | xargs -I '{}' mv {} /destination/dir I learned this line of code from this forum as well and it works fine. However, file movement is kinda... (6 Replies)
Discussion started by: agentgrecko
6 Replies
SCANSPOOL(8)						    InterNetNews Documentation						      SCANSPOOL(8)

NAME
scanspool - Perform a sanity scan over all articles in news spool SYNOPSIS
scanspool [-cnv] [-a active-file] [-s spool-dir] DESCRIPTION
scanspool is a Perl script for use with a tradspool article spool. It will scan the active file as well as all articles in the spool and report on the errors it encounters. As this may take a while, using the -v switch is recommended to see how far the program has progressed. First, scanspool scans the active file, noting problems such as: o malformed lines; o newsgroups aliased to a non-existent newsgroup; o newsgroups aliased to a newsgroup that is also aliased. Then it will examine all articles under your news spool directory, complaining about articles that: o have a basename that starts with a leading 0; o have a basename that is out of range according to the active file; o do not contain a Newsgroups: header line; o are all header and no text; o are in a directory for which there is no newsgroup in the active file; o are in a newsgroup to which they do not belong. scanspool understands aliased newsgroups. Thus, if an article is posted to foo.old.name that is aliased to foo.bar, it will be expected to be found under foo.bar and not foo.old.name. Articles posted to a newsgroup of status "j" or "x" (the fourth field of the active file) will be expected to show up under the junk group. scanspool assumes that the path of a valid newsgroup's directory from the root of the spool tree will not contain any "." character. Thus, directories such as out.going, tmp.dir, in.coming and news.archive will not be searched. This program also assumes that article basenames contain only decimal digits. Last, files under the top level directory lost+found are not scanned. OPTIONS
-a active-file The active file to use; pathdb/active is the default. -c Only check article filenames. scanspool will therefore not actually scan the Newsgroups: header field of the articles. -n Don't throttle innd while scanning. -s spool-dir The root of the spool tree; patharticles is the default. -v Setting this flag enables a verbose mode. scanspool will then print which newsgroup is currently worked upon. It will list all the articles found in non-active directories (that is to say articles sorted into groups no longer present in the active file), rather than just printing the group once. DIAGNOSTICS
The output of scanspool will start with one of the following forms: "FATAL:" (to stderr) Fatal or internal error. "WARN:" (to stderr) active or article format problem, newsgroup alias problem, find(1) error, article open error. "path/123:" (to stdout) Issues such as: o basename starts with 0; o article number out of range; o article in the wrong directory; o article in a directory not related to an active non-aliased newsgroup. " ..." (to stdout) Verbose messages start with a tab. BUGS
scanspool is unable to detect and properly deal with spool formats other than tradspool. However, if the files that store your articles are named other than just all-digits, they will simply be skipped (and your active is still checked). scanspool only considers the first line of the Newsgroups: header field. Continuation lines are not taken into account. HISTORY
scanspool was written by Landon Curt Noll (chongo was here /../). This manual page was written by Florian Schlichting, largely based on comments in the script. $Id: scanspool.pod 9302 2011-08-04 21:10:17Z iulius $ SEE ALSO
active(5). INN 2.5.3 2011-08-22 SCANSPOOL(8)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy