When we install the program in the Ubuntu system, we often want to create and copy files in the USR directory, this folder in the Linux class system requires root permission to access, so with the normal mouse button menu operation is not valid, today share the use of commands in the terminal to create new, copy files.
Related commands:
CD path (enter a path, such as/usr/local/lib)
Cd.. (Return to previous folder)
LS (displays all files under the current folder, Linux unique, dir also has the same function)
sudo command (get Super admin permission, need to enter password)
Common New, delete, copy commands:
mkdir Directory Name (new folder, folder in Linux system called "directory")
Touch file name (create a new empty file)
RmDir Directory Name (delete an empty folder, the contents are not available in the folder)
RM-RF a non-empty directory name (delete a folder that contains files)
RM File name (delete multiple files)
CP File name target path (copy a file to the target path, such as CP Hserver/opt/hqueue)
Cp-i (copy, when a file of the same name exists, output [yes/no] asks whether to execute)
Cp-f (Force copy file, if same name not asked)
Common decompression, installation program, file Update command: Deb format double-click to install
TAR-ZXVF *.tar.gz (extract tar.gz formatted files)
SOURCE *.install (installs installation package installed in install format)
SH Path/x.sh (installs the SH format file, such as sudo sh/home/hp/downloads/*.sh)
sudo apt-get upgrade (update installed packages)
sudo apt-get update (update source)
If you want to know where the files are installed? You can go to the/usr/share/applications folder and take a look at it and create a shortcut on the desktop using the method mentioned earlier.
These are my usual commands, in fact, Linux commands abound, but with the development of Ubuntu GUI, a lot of commands in the personal desktop computer has not been used, but in the command line of the server cluster is still needed, so I admire those who maintain the server engineers, in addition, Want to have excellent programming technology, memory is really important, so you do not always stay up late, take care of your body.
Say Blog Park diary function, originally is private nature, moved to Diary of article home will not be public display, and can't move back ...
July 24, 2015 18:31:16 Update Blog:
Add an installation method in RPM format:
RPM is not actually a package, and the package management mechanism under the Debian system, if you want to install the RPM format, follow these steps:
Method One: First use alien to turn the RPM to Deb
Installing Alien:sudo apt-get Install Alien
Convert to Deb Package: alien-d xxx.rpm (deb package can be installed directly under Ubuntu)
Direct installation: Alien-i xxx.rpm
Method Two: Install the RPM Package Manager
Get installation: sudo apt-get install rpm
Create folder: mkdir/var/lib/rpm
Initialization: RPM--INITDB
Install RPM files: Rpm-ivh xxx.rpm
chmod +x *.sh This command is to add executable permissions for the SH file;
chmod +R 777 * * Changes to all subdirectories and sub-files in the current directory with 777 permissions; Copies the relevant files when the software is installed.
Author: Jiang to B
Source: Http://www.cnblogs.com/jackchiang
The content of the article welcome reprint, but please keep this paragraph statement, and in the page prominent location to give the original link, thank you for your support.
The whole meaning of life, not to enjoy, but to help others out of misery, to obtain happiness ~
Go New, deleted, and copied file commands commonly used in Ubuntu systems