Basic Linux commands and Linux commands

Source: Internet
Author: User
Tags ftp protocol

Basic Linux commands and Linux commands

  • Compression and decompression commands
    • Compression: tar-zcvf appName.tar.gz. date appFileName (for example, tar-zcvf rc.tar.gz. 0513 rc)
    • Decompress: tar-xvf tarFile
  • Tar command details:
    • Tar package compression;-c archive file,-x compressed file,-z gzip compression,-j bzip2 compression,-v view shows the compression or decompression process, and-f uses the file name.
      • Tar-cvf rc.tar rc package only, not compressed;
      • Tar-zcvf rc.tar.gz rc package and compress it with gzip. (commonly used)
      • Tar-jcvf rc.tar.bz2 rc package and compress it with bzip2.
      • Decompress, tar-xcvf fileName
  • Find Files:
    • Find./-name uc
  • Search for file content:
    • Grep-R "search content "*
  • File Permission:
    • There are three permissions: The R read value is 4, the W write value is 2, and the X executable value is 1.
    • Command: chmod
      • Chmod + x filename add executable permissions to the file;
      • Chmod + w fileanme add write permission to the file
  • Soft connection B>:
    • Ln-s A B
Linux installation service: How to view the system version in linux:
Disk space and File Usage: df-h (human readable) du-h -- max-depth = 1/usr. You can view the space occupied by files in the directory where/usr starts to be 1.
 
Command:
> Filename
View the find. /-size + 204800 view the file content find. /-type f-name "*. jsp "| xargs grep" Weihai "searches for all jsp files in the current directory, including" Weihai ", to view the deleted files. Which processes are still accessing the files: lsof-n | grep deleted:
Sudo fdisk-l
View local IP Address
Curl ifcpnfig. me
View the output file:
Tail-f nohup. out
Background startup:
Nohup./startWeblogic. sh
Lsof-p [process ID] can view the file opened by an ID process. Super copy:
Scp fromfilePath tofilePath (userName @ IP:/filePath)
ForExample:
Scp isportal_uum_sj.tar.gz.0928 root@172.16.66.18:/opt/apache-tomcat-6.0.37/webapps
 
 
> Setup to view the system status such as system servie; SFTP/ftp protocol firewall: vi/etc/sysconfig/iptables open a port limit (through the firewall ): -a input-m state -- state NEW-m tcp-p tcp -- dport 3083 (port)-j ACCEPT basic command firewall: service iptables stop/start Settings disable/Enable Firewall by default: chkconfig iptables off/on Time Synchronization Service: yum install ntp command: ntpdate cn.pool.ntp.org sysctl-w net. ipv4.tcp _ tw_recycle = 1 install gcc yum-y install gcc make gcc-c ++ openssl-devel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.