• 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)
  • 相关阅读:
    phalcon——HTTP 请求
    phalcon——闪存消息
    phalcon——验证
    Java 字符串分隔 split
    Eclipse "R cannot be resolved"问题
    Android CountDownTimer 类实现倒计时
    Eclipse 打开时“发现了以元素'd:skin'”开头的无效内容。此处不应含有子元素
    Android Studio 设置/更改 SDK 路径
    Android 开发使用自定义字体
    Android Studio "ADB not responding"
  • 原文地址:https://www.cnblogs.com/licheng/p/1256346.html
Copyright © 2020-2023  润新知