Hello, Meino. On Sat, Sep 03, 2016 at 11:52:46AM +0200, [email protected] wrote: > Hi,
> I want to 'locate' a bunch of files and feed the output into > '| xargs md5sum'. > Unfortunatexly some of them are infected with the "file name"-virus > (space in the filename). > With find there is the -print0 option which corresponds to '-0' of > the xargs options. As of my knowledge, locate does not have such > a thing. > I dont like the idea to 'find' (read: 'search again')all the files, > which locate already knows...so > Is there any trick/option/whatever to get the files with spaced > filenames processed by md5sum in combination with 'locate'? I'm afraid I don't know `locate' at all (it isn't on my system), but does it have something like `ls''s -1 option which prints out each filename on a separate line? In this case you could put quote marks around each file name, for example like this: locate .... -1 ..... | sed "s/^.*$/\'&\'/" | xargs md5sum > Thank you very much in advance for any help! > Best regards > Meino -- Alan Mackenzie (Nuremberg, Germany).

