how can I copy?
John Thompson
john at vector.os2.dhs.org
Wed Mar 19 02:30:56 UTC 2008
On 2008-03-18, Jonathan Underwood <jonathan.underwood at gmail.com> 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 at os2.dhs.org)
More information about the fedora-list
mailing list