Tips in Linux

zhaozj2021-02-17  36

Learning Linux has been a period of time. I have gradually accumulated some little experience in the process of learning, I hope to share with you: Tips for deleting files and folders: In the character interface, the RM will be completely deleted, if added -i, when a directory or file is to be deleted, you can prompt whether the user determines whether to execute, prevent accidental deletion. If you can put the recycle bin in XWindows, if you need it, you will recover. Use RMDir to delete the empty directory, but if you are not empty, you can use RM -FR to delete the directory. The parameters -R are all deleted all the entire directory, including all subdirectory. -f is an ignored file that does not exist and does not give the user any prompt. Use the command file to make you know that a file is an executable file in the ELF format, or the shell script file or other format. For example, the following command displays the format of the xinit file: $ FILE XINIT. When the system is wrong and does not start normally, we can enter the Linux system through the emergency boot disk, and there is a problem with the peripheral device to correct the repair. For example, the system root of the partition / dev / hda1 is first entered into a / mnt / had1 directory, and then switch the / MNT / HAD1 directory to / directory with the Chroot instruction to facilitate the implementation of various system instructions and programs: $ Chroot / MNT / HAD1 # This will change the / MNT / HAD1 directory to the root directory. Delete useless core files: Sometimes a file called Core is sometimes large after running, this file is generally large and it is not used, you can delete it to release space. Use the current path as a prompt: for Bash, in .bashrc, one line: PC1 = "/ $ PWD // $" For TCSH, in the .tcshrc 加 加 行 行 :SET Prompt = "% />"

(Tab key) If it is in XWindows, you can also drag the left mouse button to copy to the command to make the text, at this time, the inverse area has been copied, and then the right mouse button is in the cursor, the command is pasted. Go up and implement it quickly. Display the type of file to view the information at the time of Linux :Linux starts the information displayed when the screen display is not as clear. If you are interested in this information, you can use the command dmesg to view after startup.

Mattrib Displays the property MCD change directory to the specified path MCOPY Summer file to the specified path MDL to delete the specified file MDIR Display specified file MFORMAT Format Floppy Command MLabel Specify the MMD to create a Directory MRD Delete Directory (Must be empty) MREN Replace File Name MTYPE Shows DOS File

转载请注明原文地址:https://www.9cbs.com/read-29050.html

New Post(0)