[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
 

Omdøbning af mange filer



Jeg har en stor mængde filer i et directorytræ, som skal flyttes fra ext3
til vfat. I den forbindelse skal jeg have fjernet en række tegn fra fil-og
directorynavne, som er lovlige under ext3, men ulovlige under vfat.
Hvordan gør jeg det nemt? Helst i bash.

Jeg har luret at jeg nok skal bruge en kommando i stil med

for i in `find . -name '*'`

Ja, jeg vil finde både filer og directories.

Men hvordan hulen erstatter jeg et tegn med et andet, når der er tale om
et ud af en liste af tegn der skal ændres til _?

Helt specifikt er der tale disse tegn: " < > ? * : "

Og hver forekomst af dem skal ændres til _

Og det er vigtigt at huske at der helt sikkert er mellemrum i både fil- og
directorynavne, så der skal nok plinger eller noget uden om hvert fil- og
directorynavn.

-- Jens



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-07-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] *