Other operation commands in wubantu (2), wubantu

Source: Internet
Author: User

Other operation commands in wubantu (2), wubantu
1. Search for files

  • The find command searches for files that meet the conditions in a specific directory.

Find [path]-name "*. py" find the file with the extension name ". py" in the specified path, including subdirectories

  • If the path is omitted, search in the current folder
  • Wildcard characters can also be used.

 

2. Soft links (similar to shortcuts)

Establish a soft link to the source file linked to ln-s.

  • A hard-link file is created without the-s option.
    • Two files occupy the same size of hard disk space, which is hardly used during work.
  • The source file must use an absolute path instead of a relative path. This makes it easy to move the linked file and continue to work normally.

The position of the soft link file in the relative path cannot be moved !!!

 

Iii. Packaging and Installation
  • Common Windows rar
  • Common Mac zip files
  • Commonly Used in linuxtar.gz

(1) tar is the most commonly used backup tool in Linux. This command can package a series of files into a large file, or you can reply a packaged large file to a series of files.

# Package file tar-cvf package file .tar package file/path... # package file tart-xvf package file .tar

Option description

C. generate an archive file and create a package file

X unbind a file

V lists the detailed archiving process and displays the progress

F indicates the name of the file. After f, it must be a .tar file. Therefore, the options must be placed in the order of other options.

(2)gzipcompressed tarfiles, whose extension names generally use xxx.tar.gz (this is the most common compressed file format in linux)

The tar command has an option-z that can call gzip to facilitate compression and decompression.

# Compressed file tar-zcvf package file .tar.gz compressed file/path... # decompress the tar-zxvf package file .tar.gz # decompress it to the specified path tar-zxvf package file .tar.gz-C target path (the directory to be decompressed must exist) (also applies to bzip2)

 

(3) bzip2

The tar and bzip2 commands can be combined to package and compress files (same as gzip)

Tar is only responsible for packaging but not compressing

Use bzip2to compress the files behind the tars. The extension name is xxx.tar.bz2.

The tar command has an option-j that can call bzip2 to facilitate compression and decompression.

# Compressed file tar-jcvf package file .tar.bz2 compressed file/path... # decompress the file tar-jxvf package file .tar.bz2
4. Software Installation

Install/uninstall software through apt

Advanced Packing Tool is an installation package management Tool in linux.

# Install the software $ sudo apt install package # uninstall the software $ sudo apt remove software name # update the Installed Package $ sudo apt upgrade

Update downloads the metadata from the source, including the packages and versions of each package.
Upgrade determines the package to be updated based on the metadata downloaded by the update command (obtain the location of each package at the same time ).

Before installing the software, you can choose not upgrade, but update. because the old information points to the old version of the package, but after the source server is updated, the old package may be replaced by a new one, so you will encounter 404...

Two utilities ~

  • Sudo apt install sl
  • Sudo apt install htop

Related Article

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.