how can I copy?

Stuart Sears stuart at sjsears.com
Tue Mar 18 19:46:39 UTC 2008


chloe K wrote:
> Hi all
> 
> i just want to get all information stored in /proc/net
> 
> ls it possible?

something like this?

mkdir /tmp/net

for dir in $(find /proc/net -type d | sed 's,/proc/net/,,')
do
	mkdir -p /tmp/net/$dir;
done

for file in $(find /proc/net -type f | sed 's,/proc/net/,,')
do
	cat /proc/net/$file > /tmp/net/$file
done

then backup /tmp/net


ps how did you end up with not sysctl command? it should be in /sbin
(it wouldn't have been any use for this requirement anyway)

Regards,

Stuart
-- 
Stuart Sears RHCA etc.




More information about the fedora-list mailing list