Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Some common Linux commands Study Notes     - Ubuntu update bug fixes Daquan (Linux)

- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)

- CentOS7 install NTFS-3G driver (Linux)

- PostgreSQL Select source code analysis (Database)

- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)

- Docker container plaintext password problem-solving way (Server)

- Talk about Java EE Learning (Programming)

- MySQL Tutorial: About checkpoint mechanism (Database)

- Fedora 21 setting boot script (Linux)

- apt-get install openstack pkg Troubleshooting (Linux)

- How to import JNI resulting .so libraries in Android Studio (Programming)

- Analysis of MySQL Dockerfile 5.6 (Database)

- Linux system network security tools sudo Introduction (Linux)

- Cobbler remotely install CentOS system (Linux)

- Installation GitLab appears ruby_block supervise_redis_sleep action run (Linux)

- AppCode developed Mac OS X application or shared library experience summary (Programming)

- To install Python-Pip and Fabric under CentOS / Ubuntu (Linux)

- About MongoDB query method according to fuzzy field (Database)

- Configuring Sublime Text Python runtime environment 2 (Linux)

- Linux landing problem (Linux)

 
         
  Some common Linux commands Study Notes
     
  Add Date : 2018-11-21      
         
         
         
  For Linux, I was a novice, but also the contact began to slowly work with Linux people I would feel Cock Cock, and now the work of some commonly used Linux command record it for future study and reference.

cd

I think this may be one of the easiest Linux command because the windows operating system also applies to the command It is mainly used to change the directory, it can be followed by the absolute path or with a relative path, such as:

cd d: / wjl_hexo ## to the D disk directory wjl_hexo
cd .. ## to the parent directory of the current directory if the current directory is D: / wjl_hexo, after the execution of the current directory is the root directory D
cd ~ ## to the root directory
 

ls

This command is used to display the file and directory folder information can be followed without parameters, without arguments, it will only display basic information parameter can take more, such as:

-a ## all files, hidden files together (starts. Item) listed together (common)
-l ## in the form of a long string of data listed in the data files and directories in the current directory
-lR ## in the form of a long string of data lists all files in the current directory (think about the reuse)
-t ## chronological
 

grep

This command is used to search for text, find text information we need, in the format: grep 'keyword' filename, when you view the log with more, may be followed by parameters such as:

grep 'Create Order' filename.log -c ## statistical keyword 'Create Order' in the number of occurrences in filename.log
-i ## Ignore case differences keyword search
-v ## adverse selection, that is, the keyword information to display does not appear
tail

Commonly used in the log viewer for displaying the designated end of the file content, format: tail [parameters] filename, common parameters:

End -f ## dynamic text display, real-time view of the current log output may also be entered directly tailf filename
-n ## display n lines of information, such as: tail -n 5 filename, displays the file last five lines tail -n +5 filename, displays the file start from the fifth row
 

less

Powerful text view command, you can not modify the contents of the text using the keyboard up down to view the format:.. Less [parameters] filename, such as:

-b ## < buffer size> set the buffer size
-e ## When the file display ends automatically leave
-N ## Display each line number
 

Input / keyword or? Keyword, keyword information can be retrieved.
Secondary action:

J moved forward line
K to move back one row
g to move to the first row
G moves to the last row
q to exit the less command
ctrl + F to move forward one screen
ctrl + B to move back one screen
ctrl + D to move forward half a screen
ctrl + U to move back half a screen

rm

Command is used to delete one or more files and directories, format: rm [parameters] file / folder, such as:

rm file ## will be prompted whether to delete the file
rm -f file ## forcibly remove the file, the system does not prompt
rm -rf folder ## folder and delete all the contents of the directory without prompting
rm -i * .log ## Delete all .log files, one by one asked to confirm before deleting
rm -r folder ## delete the subdirectory and all subdirectories
     
         
         
         
  More:      
 
- Swift 2.0 brief (Linux)
- Oracle table space is too large processing time (Database)
- Ubuntu 15.04 Linux install anti-virus software Antiviral 0.2 (Linux)
- Transfer files and permissions from Windows to Linux system by Samba (Linux)
- C # mobile side and PC-side data exchange (Database)
- Github with .gitignore ignore specified file (Linux)
- Using C / C ++ extensions Python (Programming)
- RPM package management under Linux (Linux)
- Error code: 2013 Lost connection to MySQL server during query (Database)
- Grading defense against Linux server attacks (Linux)
- How to install new fonts on Ubuntu 14.04 and 14.10 (Linux)
- Spring classic face questions Share (Programming)
- installation and configuration of the PHP environment (Apache2) under Linux (Server)
- Linux shell scripts bubble sort (Programming)
- Six Ways to view slides can be implemented Android (Programming)
- To_explore Linux system boot process (Linux)
- Alternative methods of intrusion bundled executable file new thinking (Linux)
- Perl loop (Programming)
- Linux install Eclipse for C / C ++ Development (Linux)
- Java memory mechanism Description (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.