[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] (solved)Re: [TEKNIK] foreach lökke kan ikke li' space



Det er meget vigtigt at du retter * til ., ellers kan der ske stor
skade på dit system.

Tak for varningen. Jeg pröver at ikke bruge det mere. Men jeg har opdaget at jeg for anderledes output med . end med * ... Hvordan kan jeg få samme output med . som med * ?

Sådan her vil jeg gerne have output:
audigy/manual$ find * -type f -print
AudigyPlayerQSBack.pdf
AudigyPlayerQSFront.pdf
Audigy Player Users Guide English.pdf

Med . får jeg ./ i output:
audigy/manual$ find . -type f -print
/AudigyPlayerQSBack.pdf
/AudigyPlayerQSFront.pdf
/Audigy Player Users Guide English.pdf

Og uden nogen path får jeg også ./:
audigy/manual$ find -type f -print
/AudigyPlayerQSBack.pdf
/AudigyPlayerQSFront.pdf
/Audigy Player Users Guide English.pdf

Hvis jeg bruger folder, så kommer ikke ./, men så får jeg med folder i output. Og det vil jeg ikke altid:
audigy$ find manual/ -type f -print
manual/AudigyPlayerQSBack.pdf
manual/AudigyPlayerQSFront.pdf
manual/Audigy Player Users Guide English.pdf


Løsning til dit problem er at bruge -exec til find.
find . -type f -exec sha256sum -b {} \;

Mange tak, den virkede også godt. Jeg blev så nödt til at smide en sortering ind også, for at få lidt orden. I den anden eksempel jeg fik, som virkede, kunne jeg smide sort ind i pipen:
$ find . -type f -print0 | sort -z | xargs -0 -l1 sha256sum -b

Hvordan kan jeg göre det i find . -type f -exec sha256sum -b {} \; ?




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *