Posted in 29/03/2010 ¬ 10:25h.fabio
If you want to tar a multiple files you must write a file containing a list of file to backup and the use this command: cat listoffiles.txt | xargs tar czvf yourbackupname.tgz – or tar zcvf yourbackupname.tgz $(cat listoffiles.txt)
Read the rest of this entry »
Posted in 22/03/2010 ¬ 16:40h.fabio
$ sudo sysctl -w net.inet.ip.forwarding=1 $ sudo natd -interface en1 $ sudo ipfw add divert natd ip from any to any via en1
Read the rest of this entry »
Posted in 01/02/2010 ¬ 16:49h.fabio
< ?php function ping($host) { exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval); return $rval === 0; } $hosts_to_ping = array('127.0.0.1'); ?> < ?php foreach ($hosts_to_ping as $host): ?> < ?php echo $host; ?> < ?php $up = ping($host); ?> < ?php echo $up ? 'on' : 'off'; ?> < ?php endforeach; ?>
Read the rest of this entry »