Use Linux to get rid of a few command habits _linux

Source: Internet
Author: User
Tags mkdir

First, create a directory habit

~ $ mkdir tmp 
~ $ cd tmp 
~/TMP $ mkdir a 
~/tmp $ CD a 
~/tmp/a $ mkdir b 
~/tmp/a $ cd b 
~/tmp/a/b/ $ mkdir C 
~/tmp/a/b/$ cd C 

Should use:

 
 

Second, the habit of extracting files

CP a.tar.gz/tmp 
Cd/tmp 

Should use:

 
 

Third, grep

 
 

Replaced by

 
 
 
 

Replaced by

 
 

Four, awk

You should use awk for values in a particular location

~/tmp $ ls-l/tmp| grep Dec 
-rw-r--r--7 Joe Joe 12043 20:36 december_report.pdf 
-rw-r--r--1 root root 238 Dec 08:19 Readm E 
-rw-r--r--3 Joe Joe  5096 Dec 14:26 Archive.tar 

To

~/tmp $ ls-l | awk ' $ = = Dec ' 
-rw-r--r--3 Joe Joe  5096 Dec 14:26 archive.tar 
-rw-r--r--1 root root 238 Dec 03 08:1 9 README 

Summarize

The above is to give you summed up to get rid of the use of a few Linux command habits, I hope the content of this article for everyone's study or work can help, if there are questions you can message exchange.

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.