self-study notes linux command

2011-06-17  来源:本站原创  分类:OS  人气:76 

List file:
ls-F to distinguish files and directories
ls-F-R to distinguish files and directories and list all files under each directory
ls-l lists the file details

Create a file:
touch file1
tee file1
vi file1

View Document:
stat file1 view a complete summary of the status of the file
file file1 view the file types
cat file1 view the file contents
cat-n file1 line number listed
cat-b file1 does not list the line number blank
cat-T
file1 does not list the character jump
scroll to view the file more file1
less file1 view the file, you can scroll forward or backward to the
tail file1 end of the file the default view 10 rows of data
tail-f file1 view the file tail, and has been active
tail-n lines file1 end of the file to view rows of data lines
head file1 and use the same tail, which shows the beginning of the file data

View disk space
df
df-h

Search data
grep str file1 file1 in the search string in the str
grep-v str file1 file1 search in a string of non-str
grep-n str file1 search and list the line number where the str
grep-c str file1 lists the number of rows containing str
grep-e str1-e str2 file1 file1 in the search string in str1 or str2

Compressed data
bzip2 compressed. bz2 compressed files
bzip2 myprog myprog file compressed myprog.bz2, and be replaced myprog
bunzip2 myprog.bz2 extract
bzcat myprog.bz2 view the contents of compressed files

gzip compressed. gz compressed files
gzip myprog myprog file compressed myprog.gz, and be replaced myprog
gzip myprog.gz extract
gzip myprog.gz view the contents of compressed files

zip compressed. zip files compressed
zip-r test.zip test test compressed file or directory of files into a testzip.zip
Unzip the file unzip test.zip

tar archive to tar files
tar-cvf test.tar test / test2 / Create a file called test.tar archive, which contains
test2 test directory and the entire contents of the directory
tar-tf test.tar list (but not extracted) test.tar content
tar-xvf test.tar extract test.tar contents of the file

相关文章
  • linux study notes ----- ps command brief 2011-04-25

    PS is the most commonly used LINUX is a very powerful process viewer command 1. Ps Profile The two commands described above are used to view the current situation of users of the system, here's a look at the process, and this is also the subject of t

  • The third study notes linux: ftp 2011-03-16

    service vsftp status service vsftpd start service vsftpd stop service vsftpd restart Question 1: linux could not open chroot () list file: / etc / vsftpd.chroot_list No description vsftpd.chroot_list By creating a vi vsftpd.chroot_list 500 OOPS: cann

  • Miscellanies a recent study the Linux command 2011-07-06

    Alias ​​using the alias command on the view alone use the alias command with no parameters are listed in this system has been set alias. For example, on my system already set up an alias: alias cp = 'cp-i' alias l. = 'ls-d .* - color = tty' alias ll

  • Fedora study notes (Software & Command & Short Cut) 2011-05-20

    Software 1. Mysql Yum I installed mysql, the original installation path it is / usr / bin Command: rpm-ql mysql-server Reference: Fedora install MySql 5 14 Useful Command 1. Su Shortcuts 1. Return to wondows Default shortcut is ctrl + alt + d Modify

  • (Study Notes) linux CPU occupancy rate of under 2011-05-25

    "Proc filesystem is a pseudo-file system, it is only a memory of them, without taking external memory space. It is the way to the file system to access the operating system kernel to provide the data interface. Users and applications can be obtained

  • The fifth study notes linux: oracle 2011-05-28

    First, start the oracle service to oracle user logs on linux, in the / etc / passwd in the view that there is no oracle user if you do not know the oracle user password to root account can be reset. #: Passwd oracle After the implementation of oracle

  • (Study Notes) linux CPU utilization rate under 2011-05-25

    "Proc filesystem is a pseudo file system, only a memory of them, rather than external memory space occupied by it to the way the file system to access the operating system kernel to provide the data interface users and applications can obtain system

  • study notes header command 2011-01-04

    Note : Traditional header must contain the following three header, and can only appear once . * Content-Type: xxxx/yyyy * Location: xxxx:yyyy/zzzz * Status: nnn xxxxxx Example of a : This example uses to rerouting users to PHP's official website . He

  • self-study notes linux command 2011-06-17

    List file: ls-F to distinguish files and directories ls-F-R to distinguish files and directories and list all files under each directory ls-l lists the file details Create a file: touch file1 tee file1 vi file1 View Document: stat file1 view a comple

  • Study notes of the Linux rsync backup command 2011-06-12

    Study notes of the Linux rsync backup command Collection Study notes of the Linux rsync backup command These servers often to keep the same file or directory, such as some large software download site, they typically use multiple servers to provide d

  • Linux study notes written just fine 2011-05-27

    Linux study notes written just fine linux directory structure / Root / Bin commonly used commands binary file directory / Boot storage system startup files to be read, including the core (kernel), including / Boot / grub / menu.lst GRUB settings / Bo

  • [Linux] Awk study notes 2011-02-26

    [Switch] [Linux] Awk study notes Awk, linux, notes, study Table of Contents 1. Awk Profile 2. Awk command format and options 2.1. Awk syntax has two forms 2.2 Command Options 3 mode and operation 3.1 mode 3.2 Operation 4. Awk environment variable 5.

  • Good memory as bad written study notes 1 Linux network commands 2011-09-01

    Good memory as bad written study notes 1 Linux network commands ifconfig command to view network card configuration information. ifup, ifdown enable or disable a network device traceroute investigation connected to a host channel speed of each networ

  • View file commands cat, more, less, tail, tac, nl, od --- linux study notes 2010-12-02

    linux command to view the file as follows: cat: starting from the first line of display file contents tac: starting from the last line of the display, you can see the reverse tac is cat show! nl: is displayed, the output line number easily! more: The

  • RHCE Study Notes: RH133 2.4-manage file systems 2010-04-27

    Note: As Javaeye blog and my blog ( http://mven.cn ) format different, reproduced with the need to change the format, so RHCE study notes no longer published in Baidu space, we can get access to the following address: Personal blog: http://mven.cn CS

  • High Performance MySQL study notes 2010-09-09

    http://hi.baidu.com/thinkinginlamp/blog/item/d6daa61e9f9acc11413417cc.html High Performance MySQL study notes: find out who holds the lock over the weekend re-re-read "high-performance MySQL", found that some knowledge of point of views will be

  • I used the Linux command bc - floating point calculator. Hex conversion 2010-10-25

    I used the Linux command bc - floating point calculator, hex converter This link: http://codingstandards.javaeye.com/blog/793734 (reprint, please indicate the source) Use Description Bash built-in support for integer arithmetic, but does not support

  • Study notes reproduced OpenLDAP 2010-11-11

    OpenLDAP study notes reproduced in this entry I see is more study notes, stick out and share it. . . . Urge more support. Copyright & 2004,2005, this follow the GNU Free Documentation License (Free Document License) terms, welcome to reprint, modify,

  • I used Linux command of the bc - floating point calculator. Hexadecimal conversion 2010-10-25

    I used Linux command of the bc - floating point calculator, hex converter This link: http://codingstandards.iteye.com/blog/793734 (reproduced please indicate the source) Use Description Bash has built in support for integer arithmetic, but does not s

  • OpenLDAP study notes reproduced 2010-11-11

    OpenLDAP study notes reproduced in this entry I see is more study notes, stickers and share it. . . . Urge more support. Copyright & 2004,2005, this follow the GNU Free Documentation License (Free Document License) terms, welcome to reprint, modify,