容易忘记的一些linux命令
linux系统管理 2009-04-26 09:10:41 阅读83 评论 字号:大中小
###the commands just in gentoo
emerge #Command-line interface to the Portage system
qlist #list files owned by pkgname
qlop #emerge log analyzer
qpkg #manipulate Gentoo binpkgs
equery #Gentoo: Package Query Tool
eix #a set of utilities for searching, diffing and updating a binary cache of your local portage-trees
eix-sync #Call layman/emerge --sync/--metadata and/or show updates.
eselect #Gentoo's multi-purpose configuration and managment tool
etc-update #Handle configuration file updates
env-update #updates environment settings automatically
revdep-rebuild #Gentoo: Reverse Dependency Rebuilder
module-rebuild #rebuild the moduels after update the linux kernel
euse # Gentoo: command line USE flag editor
eclean #A cleaning tool for Gentoo distfiles and binary packages
rc-update #add and remove services to and from a runlevel
###the commands in linux
man -k printf #查询与printf相关的man文档
fbgrab #截屏 Framebuffer screenshot utility
scrot #截屏 Screen capture using imlib2
md5sum #计算检验MD5效验码
sha1sum #compute and check SHA1 message digest
rsync #a fast, versatile, remote (and local) file-copying tool,some e.g.
rsync -vzrltopg src des
-v --verbose increase verbosity
-z --compress compress file data during the transfer
-r --recursive recurse into directories
-l --links copy symlinks as symlinks
-t --times preserve modification times
-o --owner preserve owner (super-user only)
-g --group preserve group
-p --perms preserve permissions
--delete delete extraneous files from dest dirs
--force force deletion of dirs even if not empty
vim #Vi IMproved, 一个程序员的文本编辑器,some important shortcut
:sp [filename] [ctrl]wj [ctrl]wk [ctrl]wq [ctrl]ww #多窗口
v V [ctrl]v y d #vim区块选择
:set fileencoding(s)=gb2312/utf-8 # 设置文件的编码方式
:edit ++enc=GB2312
cdda2mp3 cdda2ogg cdda2wav #CD抓轨
cdrecord -v /dev/cdrw -audio *.wav #刻录音乐CD
dos2unix #DOS/MAC to UNIX text file format converter
unix2dos #UNIX to DOS text file format converter
top #display Linux tasks
htop #interactive process viewer
iotop #simple top-like I/O monitor
iftop #display bandwidth usage on an interface by host
irssi #a modular IRC client for UNIX
/exec -out wgetpaste file #irssi use extern command
screen #screen manager with VT100/ANSI terminal emulation
screen -S new-tty #server
screen -x new-tty #cleint
screen rtorrent
ctrl+a d
screen -ls
screen -r ID
reset # terminal initialization also can be "tset"
w3m #a text based Web browser and pager,also such as "lynx", etc.
mount #挂载文件系统
mount -o loop xxx.iso /media/cdrom/
mount -t smbfs -o username=,password=,iocharset=utf8,codepage=cp936 //192.168.1.21/Download /mnt/tmp/
mount -t cifs -o iocharset=utf8,codepage=cp936,user=,pass=,dom=,guest //src /media
rdesktop #Remote Desktop Protocol client
rdesktop -a 24 -z -g 1276x716 -u administrator -r clipboard:PRIMARYCLIPBOARD 10.10.251.1:3389
rdesktop -a 16 -z -g 1020x716 -u justin -r clipboard:PRIMARYCLIPBOARD -r sound:local 10.10.251.1:3389
ssh # OpenSSH SSH 客户端 (远程登录程序)
xhost +server-IP #on the client computer
ssh server-IP #on the client computer
export DISPLAY=client-IP:0.0 #on the server computer
rpm2cpio *.rpm |cpio -div #解压rpm包
dpkg -x *.deb #解压deb包
synclient #commandline utitlity to query and modify Synaptics driver options.
synclient Touchpadoff=0 #打开触摸板
synclient Touchpadoff=1 #关闭触摸板
split #分割文件
shnsplit -f cd3.cue -t %n.%t -o flac CD3.ape
iconv #字符集转换
iconv -f GBK -t UTF-8 file1 -o file2
mid3iconv #convert ID3 tag encodings
find enterprice/upload/ -iname "*.mp3" -execdir mid3iconv -e gbk --remove-v1 {} \;
sox #The swiss army knife of sound processing programs,音频转换
mplayer -playlist all_music.m3u -shuffle #
\# (shift+3) ##切换声道
zgv fbi #终端下的图形浏览
axel wget curl # 下载工具 ,在firefox-flashgot中的设置:/usr/bin/terminal -T Axel.is.downloading.the.file. --hide-menubar -x axel -n5 -o [FOLDER] [URL];/usr/bin/terminal -T Wget.is.downloading.the.file. --hide-menubar -x wget -c [URL] [--directory-prefix=FOLDER] [--referer=REFERER] [--post-data=POST] [--load-cookies=CFILE] [--input-file=UFILE]; /usr/bin/xterm-T Axel.is.downloading -e axel -n7 -a -o [FOLDER] [URL]
###linux硬件相关命令
dmidecode #DMI table decoder
lsusb #list USB devices
lspci #列出所有PCI设备
dmesg #print or control the kernel ring buffer
hwbrowser #hardware browser
lshal #list HAL devices
lsof #list open files
fdisk gparted cfdisk #Linux分区表操作工具软件
xrandr #primitive command line interface to RandR extension
gtf #calculate VESA GTF mode lines
echo 5 > /proc/sys/vm/swappiness #or set "vm.swappiness=5" in /etc/sysctl.conf,设置内存存取机制,与虚拟内存有关
ls -al /dev/disk/by-uuid #查询disk的UUID
smartctl #Control and Monitor Utility for SMART Disks
有0人推荐 阅读(83)| 评论()| 引用(0) |举报
评论