Re: how can I copy?

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

 



On 18/03/2008, chloe K <chloekcy2000@xxxxxxxx> wrote:
> Hi all
>
> i just want to get all information stored in /proc/net
>
> ls it possible?
>

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 :)

J.


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

  Powered by Linux