Re: how can I copy?

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

 



On 2008-03-18, Jonathan Underwood <jonathan.underwood@xxxxxxxxx> wrote:

> If you really want to make a snapshot of the file contents under
> /proc/net onto disk, you could:
>
> 1) mkdir procnet
> 2) cd procnet
> 3) create a file called snapshot with the following contents:
> #!/bin/bash
>
> for i in `find /proc/net -type d` ; do
>     mkdir -p .$i
> done
>
> for i in `find /proc/net -type f` ; do
>     echo $i
>     cat $i > .$i
> done
>
> 4) chmod +x snapshot
> 5) ./snapshot
>
> And then in your procnet directory, you should see a replica tree of /proc/net
>
> There's probably a more elegant way of scripting this  - I'm sure
> scripting gurus will jump in :)

Maybe something like this:

$ mkdir procnet
$ tar cf - /proc/net/*|(cd procnet;tar xvf -)


-- 

John (john@xxxxxxxxxxx)


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

  Powered by Linux