Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to common commands of linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about the common command introduction of Linux, which may not be understood by many people. In order to let everyone know more, Xiaobian summarized the following contents for everyone. I hope everyone can gain something according to this article.

Linux uses Linux commands to operate and manage Linux systems. For Linux system, whether it is the central processing unit, memory, disk drive, keyboard, mouse, or user, etc. are files, Linux system management commands are the core of its normal operation.

Linux commands come in two types: built-in Shell commands and Linux commands.

frequently used commands

tar and gzip

tar command

#tar [-cxtzjvfpPN] [Files & Directories...]

Parameters:

-c: parameter instruction to create a compressed file (create);

-x: Unpack a compressed file parameter instruction!

-t: Check the files in tarfile!

Note in particular that only one c/x/t can exist in the parameter release! They cannot exist at the same time! Because it's impossible to compress and decompress at the same time.

-z: Does it also have the property of gzip? Does it need to be compressed with gzip?

-j: Does it also have the property of bzip2? Does it need to be compressed with bzip2?

-v: Display files during compression! This is commonly used, but not recommended for background execution!

-f: Use file name, please note, immediately after f to continue file name oh! No more parameters!

For example, using tar -zcvPf tfile sfile is the wrong way to write it. It should be written as tar -zcvPf tfile sfile.

-p: Use the original attributes of the original file (attributes do not change by user)

-P: Can be compressed using absolute paths!

-N: Only new dates (yy/mm/dd) will be packaged into the new file!

--exclude FILE: Do not package FILE during compression!

#tar -cvf [filename.tar] [file…directory]

View the contents of a package file

#tar -tf filename.tar

Add new files to existing packages

#tar -rvf [filename.tar] [new file...]

Release package file

#tar -xvf filename.tar

gz compressed file

#gzip filename

unzip the file

#gzip -d filename.gz

or

#gunzip filename.gz

Create a compressed package

#tar -zcvf [filename.tar.gz] [file1 file2…]

View the contents of the archive

#tar -ztf filename.tar.gz

Release compressed packets

#tar-zxvf file name.tar.gz After reading the above, do you have any further understanding of the common command introduction of linux? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report