[Linux] ค้นหาไฟล์ที่ต้องการ by plug.in

27
Jul
0

สำหรับ entry นี้จะฝากคำสั่งที่หลายๆคนอาจจะตามหาอยู่ สำหรับการหาไฟล์บน linux

find

เป็นคำสั่งพื้นฐานในการค้นหาไฟล์ หรือโฟลเดอร์ที่เรากำลังค้นหาอยู่บนระบบปฎิบัติการ linux

ตัวอย่างการใช้งาน

find /path/to/ -name filename => หาตามชื่อไฟล์

find /path/to/ -type f -size +1024k=> หาตามขนาดไฟล์ (มากกว่า 1024kB /1 MB)

ฝากไว้แค่นี้หล่ะกันครับ :p

source : Find files larger than a given size in Linux | Tips4Linux.com.

PHP : Get Full URL path by plug.in

30
Mar
0

Code สำหรับ Get URl ปัจจุบันในขณะนั้น function full_url() { $s = empty($_SERVER["HTTPS"]) ? ” : ($_SERVER["HTTPS"] == “on”) ? “s” : “”; $protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), “/”)) . $s; $port = ($_SERVER["SERVER_PORT"] == “80″) ? “” : (”:”.$_SERVER["SERVER_PORT"]); return $protocol . “://” . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; }