One, the file Operation command
1. Command name: Touch (create an empty file or modify the file time) Command path:/bin/touch Execute permissions: All user function Description: Create an empty file or modify the file time using: Touchfile name
2. Command name: Cat (View file contents, from beginning to end)command path:/bin/catExecute permissions: All usersfunction Description: View the contents of the file, from beginning to endHow to use: Cat [-n] File name- NList Line Numbers
3, command name: More (split screen display file content)command path:/bin/moreExecute permissions: All usersfunction Description: Split screen display file contentsHow to use: morefile name
Space: Page DOWN B: Page UpQ: Exit
4. Command name: Head (show file header)tail (show end of file)command path:/usr/bin/headExecute permissions: All usersfunction Description: Displays the contents of the header section of the fileHow to use:Head- NNumber of rowsfile nameSpecify the first few lines of the file to displayHead- N -file nameHead-20file name
C and L are lowercase (write size for display effect)Ctrl + Cforced terminationCtrl + LClear Screen
5. Command name: ln (linked file)Command English original meaning: linkcommand path:/BIN/LNExecute permissions: All usersfunction Description: Link file
similar to shortcuts in WindowsNew connection, use different hard disk location to modify a file, both change delete source file, soft connection cannot open ln- Ssource Filetarget fileThe file name must write the absolute path
Ii. commands that can be manipulated by files and directories
RM (delete directory or file)Command name: RM Command English original: remove command path:/BIN/RM Execute permissions: All Users
Rm-RF Catalogue Delete files and directories- R recursive, deleting directories - F forcing
cp (copy directory or file)command name: CPCommand English original: Copy command path:/BIN/CP Execute permissions: All user syntax: CPsource FileTarget LocationFunction Description: Copy directory example: $ cp -RP[Original file or directory] [destination directory] - R Copy Directory - P Joint file attribute replication - DIf the source file is a linked file, copy the link property -Aequivalent-pdr
CPAA/tmp/ formerly copiedCPAA/tmp/bbRename Copy
MV (cut or renamed)Command name: MV Command English original: Move command path:/BIN/MV Execute permissions: All Users
Mvsource FileTarget LocationMV/ROOT/AA/tmp/ CutMVAABB renaming
From for notes (Wiz)
Basic use of the command line (file)