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

Re: OFF TOPIC: directory tree script file problem



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}
done

> I have tried various incantations of sed/cut/file and managed to
> destroy the file system on a test box! (I was root)

never never never never never never never never never never never never
EVER do anything that doesn't have to do with system maintenance as root.

NEVER EVER.

=]

-d

+( duncan brown : duncanbrown linuxadvocate net )+
+(  linux "just works" : www.linuxadvocate.net  )+

--------------------------------------------------
Understatement of the century:
"Hello everybody out there using minix - I'm doing
a (free) operating system (just a hobby, won't be
big and professional like gnu) for 386(486) AT
clones"
         - Linus Torvalds, August 1991
--------------------------------------------------




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