zoukankan      html  css  js  c++  java
  • Linux常用命令

    1. tar -xvzf something.tar.gz [-C /topath]

    2. tar -xvjf something.tar.bz2 [-C /topath]

    3. tar -cvzf obj.tar.gz directory/source

    4. find . -name "*.*" -exec grep -Hn "something" {} \;

    5. swith to character interface: Ctrl+Alt+F1 (Tested OK)

    6. system configuration: setup

    7. ctrl + l = clear (Tested OK)

    8. ctrl + z = bg, put process to background

    9. fg, put process back to front

    10. ps -ax, list all the processes (Tested OK)

    11. alt + number, switch tab (Tested OK)

    12. Ctrl + Alt + Backspace, restart X

    13. ldd, list the dynamic link library

    14. ldconfig, sync up(/etc/ld.so.conf)

    15. vimdiff file1 file2

    16. pkill processname

    17. rpm -ivh package, rpm -e --nodeps package, rpm -qa | grep something

    18. pgrep processname, find out the pid of processname

    19. CLTR+ALT+F1 and CLTR+ALT+F7, switch between text mode and graphic mode.

    20. /etc/profile, System wide environment and startup programs, for login setup (Tested OK)

    21. mount -o loop sourcepath/example.iso destination/path, how to mount an iso image

    22. /etc/fstab, filesystem mount table

    23. ntsysv, choose services that would be automatically started

    24. unzip something.zip, unzip zip file

    25. /etc/inittab, system run level setup  (Tested OK)

    26. netstat -anp, find out system port map  (Tested OK)

    27. yum search/provides xmms, yum install xmms, search xmms related packages and then install xmms and related packages.

    28. scp root@172.16.181.133:/tmp/write_outfile.txt ., use scp to copy /tmp/write_outfile.txt on 172.16.181.133 to current directory.  (Tested OK)

    29. scp ./write_outfile.txt root@172.16.181.133:/tmp, use scp to copy ./write_outfile.txt to /tmp on 172.16.181.133  (Tested OK)

    30. export http_proxy=172.16.99.132:911, setup http proxy for system  (Tested OK)

    31. tail -f example.log, to see the log file synchronized

    32. find . -name CVS -exec rm -rf {} \; 批量删除CVS目录

    33. ln -s from to, 建立符号链接  (Tested OK)

    34. command 2> errors, 标准错误重定向至errors文件

    35. lsof -i :PORT, 查看端口是哪个程序打开的

    36. chkconfig firewall off, 永久关闭防火墙  (Tested OK)

    37. init 6, reboot, 重启机器

    38. init 0, shutdown -h now, poweroff, 关闭机器  (Tested OK)

    39. uname -a, 查看kernel信息

    40. whereis perl, 查看perl所在位置  (Tested OK)

    41. ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up, 配置eth0的IP地址同时激活该设备  (Tested OK)

    42. ifconfig eth0 up, 激活设备eth0  (Tested OK)

    43. ifconfig eth0 down, 禁用设备eth0  (Tested OK)

    44. /etc/rc.d/init.d/iptables stop, 临时禁用防火墙  (Tested OK)

    54. df -h; fdisk -l; 查看磁盘使用情况  (Tested OK)

    55. ls -lh; 查看文件大小  (Tested OK)

    56. du -sh file/directory; 查看某目录或指定文件大小  (Tested OK)

    57. dd if=./VMware-VMvisor-big-3.5.0-65301.i386.dd of=/dev/sdb (conv=notrunc, esxcfg-dumppart -d to deactivate the active dump partition if read-only file system error occurs in EESX environment)  (Tested OK)

    58. mount -t nfs -o tcp hostname.domainname:/folder /path/foldername, mount nfs volumes  (Tested OK)
  • 相关阅读:
    如何上传整个项目或者是文件夹到github
    阅读笔记16-架构师推荐:提高90%开发效率的工具推荐
    阅读笔记15-这些普通的程序猿,如今都已进阶成为技术大佬
    python爬虫——爬取淘票票正在热映电影
    阅读笔记12-Java 面试题 —— 老田的蚂蚁金服面试经历
    SOA架构设计案例分析
    阅读笔记11-孤独后厂村:30万互联网人跳不出的中国硅谷
    阅读笔记09-Java程序员必备的Intellij插件
    阅读笔记08-程序员依然是这个时代,贫寒学子翻身的不二选择
    os.path.join()
  • 原文地址:https://www.cnblogs.com/licheng/p/1256346.html
Copyright © 2011-2022 走看看