Should survive on Ubuntu OS (3/3)

Source: Internet
Author: User
Tags gz file rar unpack

First, add the previous content:

Switch to the graphical interface first.

Ctrl ALT T outbound terminal, such as (you can use shutter, in Ubuntu Software Center to search yourself )

Tips are as follows:

F11 can make the terminal full screen

Ctrl Shift + to increase the font of the terminal

Ctrl- can reduce the font of the terminal

If you want to modify the color of the terminal, select colors (Remove the hook and then color it yourself) in the edit--profile preference

The skill is finished, then the utility command:

Special Note:

The generic command of-R refers to recursive, recursion, and rarely-R

Special Example: ls-r recursively displays files in the current directory

. Usually refers to the current directory, local directory,

The files and directories that begin with . are hidden files that you create yourself, not by . Start (LS command, cannot retrieve hidden files without the-a parameter)


About File View:

Basis:

  1. Wildcard characters

    * represents several characters, such as ls-l A*.java (Find Java files starting with a)

    ? Represents a single character, such as ls-l a?. Java (results found may be Ab.java, Ac.java, A3.java)

    [...] Represented in the range (bracket wildcard, often and-together) for example (see, to A1.txt, A2.txt, A3.txt)

    "^ ..." is outside the range (the brackets are not added) (see chart directly)


  2. Related commands (file, cat, more less, head tail)

    1. File This is to see the type of files (will have a clear description)

      File A1.txt (Result is a1.txt:empty)

      This will prevent you from going to the binary file (before opening the file, if you're not sure you can look at its type first)

    2. Cat has said last time, the commonly used parameter is-b-n-s (memory method is, pressure does not compress empty lines, give no blank line number)

      Supplemental tips, if you don't use the mouse, at the terminal, how to page? SHIFT + PAGDN , shift + pageUp upside down

    3. More less (this is two orders, more important, very similar, put together to say)

      More paging view (down view: SPACEBAR, bottom view: Shift + Pagup, exit: Q)

      More/etc/apt/sources.list


      Less paging view (next Ctrl + F, prev Ctrl + B, Q exit)----This more convenient, use this more

      Less/etc/apt/sources.list

    4. Head tail (view file header, tail)-----is tricky to use, not much in the basic stage

      You look directly at the picture:

      is to view the first few lines of the result of a file or the previous command , without specifying the-n parameter, the default 10 rows

      Tail Tips

      (the-f parameter can also be used when tracking log files.)

      tail-f a1.txt (Typing this command and then open a terminal to use the Nano to write A1.txt file save, see the effect, with Gedit No)

      At the beginning (Waiting for tracking)

      Edit the A1.txt file with nano text editor and save (Nano A1.txt then crtl+o Save, see effect)

      File truncated. (Exit Nano Editor Ctrl + X)


      Head tips (Quick view of multiple files) (for example, check A1.txt, A2.txt, A3.txt)

      head-99999 a1.txt a2.txt A3.txt

      The contents of three files are displayed in a single swoop

  3. Supplemental text editor (gedit, Nano) (like some advanced, such as Vim what, too powerful, need to speak alone, so do not too much)

      1. Gedit Graphical text editor (gedit file name) (Create a blank file on the Ubuntu GUI and open it by default)

        Use it to edit the file, there will always be a file, tail with ~, is a temporary file (say so much)

      2. GNU Nano, abbreviated as Nano (CTRL + O save, CTRL +x exit)

Originally said above should be finished, but, just so, can not be guaranteed to live in Ubuntu, it should be said that the use of Ubuntu inconvenient, or some----I mean you are not familiar with the words, may be a bad thing on the uninstall, Rich also directly buy Mac, so today as the end of the article, Say more, wordy things.


  1. About packaging and compression (please distinguish between two concepts of packaging and compression)

    1. Packaged

      TAR-CVF Ab.tar a b (a B is two files, packaged into a Ab.tar file) (-C To create the package,-V to display the process,-F must be added)

    2. Unpack

      TAR-XVF Ab.tar (Unzip the Ab.tar in the current directory, key parameter-X)

      To unpack a file in a package separately

      ---first view the contents of the package TAR-TVF Ab.tar (-t view the list of files in the package)

      ---and then out of the file tar-xvf Ab.tar a (the last one is the file name you want to separate out)

      Want to unpack to another directory-C

      TAR-XVF ab.tar-c Directory Name

    3. Compression (typically for tar files)

      Because the UNIX-integrated bzip2 efficiency of Linux is slightly less than gzip, so just say gzip.

      gzip Aa.tar (Results obtained aa.tar.gz) (The efficiency of compressing text files is quite high)

      TAR-ZCVF aa.tar.gz A.tar (key parameter-Z)

      TAR-ZCVF aa.tar.gz a b (File A and file B are compressed directly into a. tar.gz file)

    4. Decompression (gunzip)

      gunzip aa.tar.gz (Results get Aa.tar)

      tar-zxvf aa.tar.gz (What you get before you compress)

      ---

      Have to say the RAR, this thing, very annoying, it turned out not a freeware software

      Encountered, please install RAR and unrar  :

      sudo apt-get install rar     (You must be a snake and compress it into this format?)

      sudo apt-get install unrar    ( Unzip the RAR file into a separate directory:   rar x filename

  2. File Lookup Search (which, Whereis, find, locate)

    which command name to see where command commands are located, such as which LS (/BIN/LS)

    Whereis file name (Find executable binaries, source files, document Mamual)

    Find File name (Search file system to find, you say slow, so less use or optimize the use)

    ---> find-name ' *af ' (in the current directory, file name, find, file name containing AF files)

    Locate file name (Disk file data are recorded in a database, find a database faster than the search file system, more commonly used )

    ---the newly created or modified file may not be written to the database system by the cron process, so please update sudo updatedb


Well, don't too much, hope to live on the Ubuntu12.04. (There's a lot of attention and tricks, so make sure you don't uninstall Ubuntu)


Speaking of comparative basis, and the layout is ugly, please gently spit groove
If you think my article to you a little help, please give me a praise, feel relatively low or where write wrong, please hurriedly, high me a sound, thank you.

Three articles per week

Merlin 2015/8/15 Night


Should survive on Ubuntu OS (3/3)

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.