Home > Article > Operation and Maintenance > What are the basic file commands commonly used in Linux?
man man ls
help Get help information for viewing the shell’s built-in commands (cd)
ctrl c Stop the process
ctrl l Clear the screen (clear) Completely clear the screen (reset)
pwd: Display absolute path
ls【 Options]: Display the contents of all directories under the current file
Options: -a All files including hidden files
-l Long data list (equivalent to ll)
cd Path: Switch path
mkdir [Option] File name: Create a new folder
Option: -p can create multi-layer directories
rmdir File name: Delete one Empty folder
touch File name: Create an empty file
cp [Option] Original file Destination file: Copy file operation
Option: -r Recursively copy the entire Folder
rm【Option】 File name: Delete file
Option: -r Recursively delete all contents of the directory
-f Force the deletion operation
## Turn page] [enter: next line]
Substring (searching up for the specified string)
echo: Output the content to the console
head [Option]: Display the file header information
Option: -n 5 Display 5 lines
tail [Option]: Display information at the end of the file
Option: -f Track all updates to the document in real time
Output redirection> Append> >
1) ls -al > File: Write the contents in the list to the file (overwrite)
echo Contents>> File Append the contents to the file
Soft connection
Delete the soft connection: rm -rf soft connection name rm -rf soft connection name/[real file directory It will also be deleted]
history View history command
date %Y%m%d Display year, month and day %H %M %S hours, minutes and seconds
date -d '1 days ago': Display the time of the previous day
date -d '-1 days ago': Display the time of tomorrow
Set the system time
date -s "Standard format of time YY-MM-dd hh:mm:ss"
cal View calendar
The above is the detailed content of What are the basic file commands commonly used in Linux?. For more information, please follow other related articles on the PHP Chinese website!