* Lost in space
@ 2006-03-24 6:31 Meino Christian Cramer
2006-03-24 6:41 ` Dan Nelson
0 siblings, 1 reply; 4+ messages in thread
From: Meino Christian Cramer @ 2006-03-24 6:31 UTC (permalink / raw)
To: zsh-users
Hi,
Somehow I got lost in space (" ").... :)
Currently I am building up a new Linux system (Gentoo) on one
harddisk while my old system is still alive on the other harddisk.
Both disks are identical (same model) and are partitioned identical.
I want to compare parts of the contents of directory trees on both
harddisk.
Unfortunately they consists partly of downloaded webpages. The
resulting filenames are [CENSORED] and [CENSORED] or in other words:
They contain every kind of "illegal" characters one could think of.
To do the comparison I want to md5sum each file and compare the lists
of files afterwards.
My first idea was seomthing like (being in the root of the directory
tree in question):
find . -type f | zargs md5sum | sort -w 32 > filelist.txt
but this one gets confused as soon as find finds an
"Illegal filename .txt".
How can I build up a similiar command which "eats" any kind of
filename and md5sums (not skip) those files without calling md5sum
for each file seperately ?
Is there any neat zshy trick ? ;)
Keep hacking and thank you very much in advance for any helpful reply ! :O)
Have a nice day!
mcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lost in space
2006-03-24 6:31 Lost in space Meino Christian Cramer
@ 2006-03-24 6:41 ` Dan Nelson
2006-03-24 6:57 ` Meino Christian Cramer
2006-03-25 22:30 ` Tobias Gruetzmacher
0 siblings, 2 replies; 4+ messages in thread
From: Dan Nelson @ 2006-03-24 6:41 UTC (permalink / raw)
To: Meino Christian Cramer; +Cc: zsh-users
In the last episode (Mar 24), Meino Christian Cramer said:
> To do the comparison I want to md5sum each file and compare the
> lists of files afterwards.
>
> My first idea was seomthing like (being in the root of the directory
> tree in question):
>
> find . -type f | zargs md5sum | sort -w 32 > filelist.txt
find . -type f -print0 | xargs -0 md5sum
--
Dan Nelson
dnelson@allantgroup.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lost in space
2006-03-24 6:41 ` Dan Nelson
@ 2006-03-24 6:57 ` Meino Christian Cramer
2006-03-25 22:30 ` Tobias Gruetzmacher
1 sibling, 0 replies; 4+ messages in thread
From: Meino Christian Cramer @ 2006-03-24 6:57 UTC (permalink / raw)
To: dnelson; +Cc: zsh-users
From: Dan Nelson <dnelson@allantgroup.com>
Subject: Re: Lost in space
Date: Fri, 24 Mar 2006 00:41:21 -0600
Thanks a lot ! :O)
mcc
> In the last episode (Mar 24), Meino Christian Cramer said:
> > To do the comparison I want to md5sum each file and compare the
> > lists of files afterwards.
> >
> > My first idea was seomthing like (being in the root of the directory
> > tree in question):
> >
> > find . -type f | zargs md5sum | sort -w 32 > filelist.txt
>
> find . -type f -print0 | xargs -0 md5sum
>
> --
> Dan Nelson
> dnelson@allantgroup.com
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lost in space
2006-03-24 6:41 ` Dan Nelson
2006-03-24 6:57 ` Meino Christian Cramer
@ 2006-03-25 22:30 ` Tobias Gruetzmacher
1 sibling, 0 replies; 4+ messages in thread
From: Tobias Gruetzmacher @ 2006-03-25 22:30 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Hi,
On Fri, Mar 24, 2006 at 12:41:21AM -0600, Dan Nelson wrote:
> > find . -type f | zargs md5sum | sort -w 32 > filelist.txt
>
> find . -type f -print0 | xargs -0 md5sum
Or even:
zargs -- **/*(.) -- md5sum
The sort is not really needed, since the result of the globbing should
already be sorted.
Greetings Tobi
--
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
Registered FLI4L-User #00000003
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-25 22:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-24 6:31 Lost in space Meino Christian Cramer
2006-03-24 6:41 ` Dan Nelson
2006-03-24 6:57 ` Meino Christian Cramer
2006-03-25 22:30 ` Tobias Gruetzmacher
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).