Linux Learning notes pipeline pipe LS CP MV

Source: Internet
Author: User

As LS |less-mn meaning to output the LS result to less

[ls] = = Pipe = = [More]

ls command

Ls-a Show hidden files < hidden files in general. Start >

Ls-t sorted by timestamp ls-f

Ls-l Show Long columns

Ls-r Recursive display of information

Create a file Touch <touch filenames>

Create a folder mkdir

mkdir dir3 dir4 DIR5 Create multiple folders

mkdir ~/games Create the Games folder in this directory of logged-in users

Mkdir-p DIR6/DIR7/DIR8 Creating multi-tier folders

Copying a replicated folder

Example:-->tomcat < source folder to copy >

-Other

--Folder

-->tomcat_2 < destination folder empty folder >

Steps

#cd Tomcat into the Tomcat folder

#cp-ri *. /tomcat_2

CP [-i] source_file destination_file

Mv:move or rename files and directories

MV [-i] source target_file

MV [-i] source target_directory

For example:

1 #mv dir1 Dir2

Folder Dir1 disappears soon the file header Dir1 renamed to Dir2

2 Folder 2 If there is a folder Dir1 moved to the folder Dir2

#mv file1 file2

1> File1 renamed to File2 if the folder File2 does not exist

2> if the file file2 exists file1 disappear file2 be replaced by File1 content

Rm&rmdir

Remove files

Delete empty folder RmDir dir

Delete non-empty folders Rm-ri dir

Confirm that the file you want to delete is only deleted when you enter Y to enter any other alphabetic file that is not deleted

Rm-rf dir forcibly delete directory without interactive information

3> Removing files

#rm-I file has information to confirm the deletion of files

#rm file1 file2 A file to confirm the deletion

#rm-rf file to forcibly delete file files

Linux Learning notes pipeline pipe LS CP MV

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.