chmod -R o+rwx 目錄
vim shift+3 選中的詞搜索
查看進程
ps -ax|grep " "
找文件
find / -name "" 2>/dev/null
文件格式轉換
iconv -f gb2312 -t utf-8 20150422_0.log >>a.log
進入ruby命令行模式
irb
ruby運行腳本
ruby a.rb
目錄顯示樹形
tree
ptree 線程樹
端口線程號
# netstat -lnp | grep 80
# netstat -lnp | findstr "80"
下載
wget url
多線程下載
aria2c -x 16 -s 16 [url]
查看mac
arp -a
查看dns
nslookup
判斷一個文件是否debug還是release
readelf -S
段多的就是debug.
section headers數據庫sqlplus直接鏈接
sqlplus core/core@192.168.75.1:1521/instancename
刪除日志
find ./ -mtime +$days -name "*.log" -exec rm -rf {} \;
添加計劃任務
crontab -e
10 0 * * * /kfts/its/scripts/auto-del-30days-ago-log.sh >/dev/null 2>&1
sudo adduser username
passwd
sudo userdel username
ss -ln
檢查glibc實用的版本.
rpm -qa | grep glibc
檢查程序編譯的glibc版
ldd tserver
按大小排序文件夾du -hd1 | sort -hr 比較2個文件
vimdiff file1 file2 只列出wenj
ls -l | grep ^- vitrualbox 建立貢獻目錄
mkdir /mnt/it
mount -t vboxsf share_linux /mnt/its/
/sbin/mount.vboxsf:mounting 目錄沒先建好.
抓端口被那個進程占據了.
netstat -tunlp |grep 7900
$ sudo yum remove ruby ruby-devel
Build and install the latest Ruby from the source as follows.
$ sudo yum groupinstall "Development Tools"
$ sudo yum install openssl-devel
$ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
$ tar xvfvz ruby-2.1.2.tar.gz
$ cd ruby-2.1.2
$ ./configure
$ make
$ sudo make install