LINUX-WGET/TAR/LN function

Source: Internet
Author: User
Tags ftp protocol

1. To get the package, you can use wget, Ubuntu can use apt-get source to get the code

wget is a simple and powerful free software that downloads on the web and supports the HTTP,HTTPS,FTP protocol.

# command Format wget   [Options]   [URL]

features :

    1. Support HTTP,HTTPS,FTP protocol, can use HTTP proxy , automatic download (can be executed in the background after the user exits the system);
    2. You can trace the links on the HTML page to download, and completely rebuild the original Site directory structure (recursive download);
    3. very stable , with a strong applicability to unstable networks;

Example :

# Download the file at the specified URL and save it to the current directorywgethttp//Www.minjieren.com/wordpress-3.1-zh_CN.zip# Set the downloaded file to be placed inside the Wordpress.zip (--output-document=file)wget-O WordPress.Ziphttp//www.minjieren.com/download.aspx?id=1080# The breakpoint continues to pass (--continue), then downloads the file which is not finished downloadingwget-C http://Www.minjieren.com/wordpress-3.1-zh_CN.zip# Background Download (--background)wget-B http://Www.minjieren.com/wordpress-3.1-zh_CN.zipTail-Fwget-log # View Download Progress

2. Extracting the source code [2]

tar -zxvf xxx. tar. gz

Have and can only specify one:

- x: decompression; - R: Append files to the end of the compressed archive file; - T: View the contents of the compressed file; - C: The establishment of compressed archives; - u: Update the files in the original compressed package;

Optional Parameters :

- v: show all processes; - z: With gzip compression (. GZ); -j: with bz2 compression; - z: With compress compression;

Necessary Parameters :

- F: Use the file name, this parameter is the last parameter, only after the file name;

3. Establish Link: ln

LN is an important command under Linux, used to establish a synchronization link for a file or directory in another location, you can create a virtual association for a folder across disk, and when accessing the associated folder, it jumps to the associated directory, and there are two types of links: (1) hard link; (2) Symbolic links (symbol link); The default link type is hard link , if you want to establish a symbolic link, to develop the-s parameter (s is shorthand for symbol)

sudo Ln -S source file destination file

For example, the current directory is/local, and I would like to visit/usr/local/linux/work This file frequently, you can create a file under/local linkwork:

sudo LN -s/usr/local/linux/work/local/linkwork

There are other options that can be set, such as-f (--force): Force the connection of a file or directory, regardless of whether the source file or directory exists,-D (or-F or--directory): Make a hard link to the directory.

The Mklink command under Windows can be used to establish a connection:

>mklink/? MKLINK [Options] link targetoptions:/D  Create a directory symbolic link, default to file Symbolic link /H to create a  hard link instead of a symbolic link /  J   Create a directory connection (hard link) Link  Specifies the new symbolic link name target   specifies the address to which the new connection is referenced

For example, now you want to associate the directory, establish C:\ProgramData\Oracle this directory and D:\WindowsLib, you can enter:

mklink/j D:\WindowsLib\OracleLib C:\ProgramData\Oracle

Oraclelib in the D Disk Windowslib folder can not be established beforehand, otherwise it will prompt the file already exists, create the failure;

Also note:

    • There are spaces in the folder name can not be created;
    • Folders that require higher permissions cannot be created;

Reference documents:

[1] One Linux command per day (a): wget command: http://www.cnblogs.com/peida/archive/2013/03/18/2965369.html

[2] The TAR compression decompression command under Linux: http://www.cnblogs.com/qq78292959/archive/2011/07/06/2099427.html

[3] ln command: HTTP://MAN.LINUXDE.NET/LN

LINUX-WGET/TAR/LN function

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.