Order
??? This is a broken note to order??
I started learning Linux yesterday and took notes for later.
Linux system directory structure diagram
bin--is mainly used for storing binaries (such as command files) boot--boot directory dev--device directory ect--configuration folder home--User folder lib--Library folder mnt--mount directory opt--usually large software installed here proc--Real-time information ( Only in memory) sbin--Super Bin only root user can execute sys--System Folder tmp--temporary folder usr--application installation directory (usually) var--frequently changed information stored (e.g. log file) common commands date-used to view dates
date +%Y--%m--%d //后面参数为时间格式
hwclod--Viewing hardware time cal--displaying the calendar uptime--viewing the time the system is running echo--display the input content
echo hello Linux
cat--displaying the contents of a file
cat Main.c
head--display the first few lines of a file
head Main.c3//显示Main.c的前三行内容
tail--Displays the end of the file in a few lines
tail Main.-n3//显示Main.c的后三行内容tail Main.-n-f//显示Main.c的后三行,并且在内容发生改变时变化
more--output in the form of a page turn (only page down) less--output content as a page turn (page UP, q exit) lspci--view the PCI device (-v View details) lsusb--View the USB device (-v View details) lsmod-- View loaded module shutdown--for shutdown and restart (requires root access)
-h//立即关闭计算机-r//立即重启计算机
poweroff--immediately shuts down the computer reboot--immediately restarts the computer archive, compressing the command zip--compression with zip
zip Main.zip Main.java //将Main.java 通过zip算法进行压缩
uzip--using zip to decompress
unzip Main.zip //将Main.zip解压缩
tar--Archive directory (packaged, not compressed)
out.tar ./mydir //将mydir进行归档,生成out.tar文件
out.tar //将out.tar文件释放归档
out.tar.gz ./mydir //将mydir先进行归档,再进行压缩,生成out.tar.gz文件
Find command locate to quickly find files, folders (pre-established a database, the default is updated daily, it is possible to create new files can not be found)
locate Main.java
Find is used to locate files
Find Dir parameter find. -name *Main* find the file with the main name in the. DirectoryFind/ -name *.Java//In the. Directory look for files with the extension Java//Common parameters are as follows://-User Type//-CTime creation Time//-type file Types//-Size File sizes//You can also continue with the next command with the search results as a parameterFind. -name "*.java" -execLs- L{}\;//Find files with a. java extension and execute the ls-l command on them, with the exception of ls-l for fixed templates
Linux Learning notes one of the Linux system directory structures and common system commands