On Thu, 15 Jul 2004, Matthias Czapla wrote:
I have no idea, but I use something like this to recurse down a tree and
do something with every file:
#!/bin/bash
for i in `find -type f`
do
whatever you wan't to do, just use $i instead of the filename.
done
This will not work if any component of a
On Thu, Jul 15, 2004 at 02:18:55PM +0200, Sturla Holm Hansen wrote:
> Since I'm kinda new at this I just have to ask what's wrong with a
> for-loop..
> To slow?
Depends on what you do in the loop's body.
> I have no idea, but I use something like this to recurse down a tree and
> do something wit
On Thu, Jul 15, 2004 at 10:54:59AM +0800, John Summerfield wrote:
> >BTW, what are all those files in your home directory? I have only
> >about 14000 and thought that this is the biggest mess ever ;)
>
> Oh, stuff. source of debs, built and otherwise. CVS checkouts of stuff.
> Documents. Photos (s
Sturla Holm Hansen wrote:
BTW, what are all those files in your home directory? I have only
about 14000 and thought that this is the biggest mess ever ;)
Oh, stuff. source of debs, built and otherwise. CVS checkouts of
stuff. Documents. Photos (see my sig for some). IBM operating systems.
Lot
John Summerfield wrote:
Matthias Czapla wrote:
On Thu, Jul 15, 2004 at 09:05:54AM +0800, John Summerfield wrote:
I don't use -exec on find any more because it's slow. When you pipe
the names into xargs as I do, then spaces cause the problem I
described.
Well, until now I didnt even know a
On Wed, 14 Jul 2004, j smith wrote:
md5sum checks one file a time. i want a script that
recursively check files in a directory.Thanks!
PS: the script's application: in DOS 6, there is
antivirus program called "msav" that check if
executables are changed or infected. such program is
no longer availa
Matthias Czapla wrote:
On Thu, Jul 15, 2004 at 09:05:54AM +0800, John Summerfield wrote:
I don't use -exec on find any more because it's slow. When you pipe the
names into xargs as I do, then spaces cause the problem I described.
Well, until now I didnt even know about xargs' purpose, tha
On Thu, Jul 15, 2004 at 09:05:54AM +0800, John Summerfield wrote:
> I don't use -exec on find any more because it's slow. When you pipe the
> names into xargs as I do, then spaces cause the problem I described.
Well, until now I didnt even know about xargs' purpose, thanks for the
pointer.
> Fo
Matthias Czapla wrote:
On Thu, Jul 15, 2004 at 07:14:30AM +0800, John Summerfield wrote:
find ~ -type f -exec cat {} \;
This fails because
cat doesn't check anything - it just copies all files to stdout
It doesn't handle files whose names contain spaces
Hu? I used cat solely
John Summerfield <[EMAIL PROTECTED]> writes:
> Since he specifically said he wants to use mdsum, it's clearer to use
> the program he said he wants to use.
>
> Try it and see what happens.
[19:24:27] wesley:~/tmp/t $ ls -l
total 4
-rw-r--r--1 ats ats 2344 2004-07-14 19:23 a b c
On Thu, Jul 15, 2004 at 02:21:52AM +0200, Matthias Czapla wrote:
> > The problem is that fragments of file names separated by spaces are
> > indistinguishable from filenames separated by spaces.
>
> This is only true when the command line is being split into words, e.g.
> by the shell. find's '{}
On Thu, Jul 15, 2004 at 07:14:30AM +0800, John Summerfield wrote:
> >>>find ~ -type f -exec cat {} \;
> >>
> >>This fails because
> >>cat doesn't check anything - it just copies all files to stdout
> >>It doesn't handle files whose names contain spaces
> >
> >Hu? I used cat solely for the purpose o
Matthias Czapla wrote:
On Thu, Jul 15, 2004 at 06:06:26AM +0800, John Summerfield wrote:
find ~ -type f -exec cat {} \;
This fails because
cat doesn't check anything - it just copies all files to stdout
It doesn't handle files whose names contain spaces
Hu? I used cat solely for the
Matthias Czapla wrote:
On Thu, Jul 15, 2004 at 06:07:26AM +0800, John Summerfield wrote:
Matthias Czapla wrote:
On Wed, Jul 14, 2004 at 02:31:10PM -0700, j smith wrote:
Thank you!
Windows has folder names that include space,
Example:"Program Files"
Will that cause trouble for your so
On Thu, Jul 15, 2004 at 06:07:26AM +0800, John Summerfield wrote:
> Matthias Czapla wrote:
> >On Wed, Jul 14, 2004 at 02:31:10PM -0700, j smith wrote:
> >>Thank you!
> >>
> >>Windows has folder names that include space,
> >>Example:"Program Files"
> >>
> >>Will that cause trouble for your solution?
On Thu, Jul 15, 2004 at 06:06:26AM +0800, John Summerfield wrote:
> >
> >find ~ -type f -exec cat {} \;
> >
> >
> This fails because
> cat doesn't check anything - it just copies all files to stdout
> It doesn't handle files whose names contain spaces
Hu? I used cat solely for the purpose of show
Matthias Czapla wrote:
On Wed, Jul 14, 2004 at 02:31:10PM -0700, j smith wrote:
Thank you!
Windows has folder names that include space,
Example:"Program Files"
Will that cause trouble for your solution?
If the command after the -exec is a "real" program and not a shell
script or something e
Matthias Czapla wrote:
On Wed, Jul 14, 2004 at 10:09:18AM -0700, j smith wrote:
md5sum checks one file a time. i want a script that
recursively check files in a directory.Thanks!
PS: the script's application: in DOS 6, there is
antivirus program called "msav" that check if
executables are change
j smith wrote:
md5sum checks one file a time. i want a script that
recursively check files in a directory.Thanks!
PS: the script's application: in DOS 6, there is
antivirus program called "msav" that check if
executables are changed or infected. such program is
no longer available is Windows, so i
On Wed, Jul 14, 2004 at 02:31:10PM -0700, j smith wrote:
> Thank you!
>
> Windows has folder names that include space,
> Example:"Program Files"
>
> Will that cause trouble for your solution?
If the command after the -exec is a "real" program and not a shell
script or something else that interpr
Thank you!
Windows has folder names that include space,
Example:"Program Files"
Will that cause trouble for your solution?
--- Matthias Czapla <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 14, 2004 at 10:09:18AM -0700, j smith
> wrote:
> > md5sum checks one file a time. i want a script
> that
> > rec
Hello
j smith (<[EMAIL PROTECTED]>) wrote:
> md5sum checks one file a time. i want a script that
> recursively check files in a directory.Thanks!
Something like
find /usr -xdev -type f -name "*" -printf "\"%p\" \n" | xargs md5sum >\
usr.md5
or (untested)
find /usr -xdev -type f -print0 | xarg
On Wed, Jul 14, 2004 at 10:09:18AM -0700, j smith wrote:
> md5sum checks one file a time. i want a script that
> recursively check files in a directory.Thanks!
>
> PS: the script's application: in DOS 6, there is
> antivirus program called "msav" that check if
> executables are changed or infected
2004. jĂșlius 14. 19:09,
j smith <[EMAIL PROTECTED]>
-> [EMAIL PROTECTED]:
> md5sum checks one file a time. i want a script that
> recursively check files in a directory.Thanks!
>
> PS: the script's application: in DOS 6, there is
> antivirus program called "msav" that check if
> executables are ch
md5sum checks one file a time. i want a script that
recursively check files in a directory.Thanks!
PS: the script's application: in DOS 6, there is
antivirus program called "msav" that check if
executables are changed or infected. such program is
no longer available is Windows, so i want a script
25 matches
Mail list logo