try to use | instead of /
example
sed -i ‘s|var/www/test|tmp|g’ /tmp/test.sh
» Linux の記事
# wget -qO- http://freegeoip.net/json/
{“ip”:”8.8.8.8″,”country_code”:”HK”,”country_name”:”Hong Kong”,”region_code”:””,”region_name”:””,”city”:”San Po Kong”,”zip_code”:””,”time_zone”:”Asia/Hong_Kong”,”latitude”:11.11,”longitude”:11.11,”metro_code”:0}
# wget -qO- http://freegeoip.net/json/ | grep -Po ‘(?<=”ip”:”)[^”]*’
8.8.8.8
Win7
C:\Windows\System32\drivers\etc
linux
/etc/hosts
linux command 搵folder 入面 jpg,png,gif 以外的files
假設要找尋的folder 為 /var/www 的所有file
find . ! -name '*.jpg' ! -name '*.png' ! -name '*.gif'
To show users who are logged in to the system
who
To show the list of users who have logged in last
last
To show the list of all reboots
last reboot
To print the content of the last login log from /var/log/lastlog
lastlog
To List out the login history for certain acc
last [username]
~ VI 常用 command ~
有時有d server 無nano , 唯有用VI
Shift + g | 頁尾 |
:wq | save |
i | Insert mode |
ESC | 出返insert mode |
:q! | quit without save |
Recent Comments