Re: OFF TOPIC: directory tree script file problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



duncan brown said:
>
> Mick Mearns said:
>> What I want to do is scan a directory structure and re-create it
>> without any files.
>
> cd /source_dir
> find . -type d | while read line
> do
>   mkdir -p /target_dir/${line}
It might be a good idea to quote this, like this:
   mkdir -p "/target_dir/${line}"
That way if any directories have spaces in them, you'll still be okay.
> done
>



____________________________________________________________________________
Bob Shaffer II - Owner/Developer/System Operator - BobShaffersComputer.com
http://bobshafferscomputer.com/          telnet://bobshafferscomputer.com



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux