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