ilmu-linux.com

Network & Linux opensource

 

Kumpulan BashScript

 

Ini adalah contoh-contoh scrip di linux atau lebih sering di kenal Bashscript, penulis mencoba mengumpulkan conto2 bashscript, yang nanti nya cukup berguna untuk pasa System Administrator linux

Mencari file berukuran besar di llinux

find / -type f -size +100000 -exec ls -lh {} \; | awk '{print $9": "$5}'

 

Ubah permission

find /home/blogs/public_html -type f -exec chmod 644 {} \;


scrip PHP cek Ip Public

<?php

$ip = $_SERVER['REMOE_ADDR'];

$hostaddress = gethostbyaddr($ip);

print "IP  :   $ip";

print "Hostname = $hostname"

?>

Leave a reply

Feel free to share your thoughts about this entry.

Nickname
Email
Website
Confirmation image
Confirmation code
Comment