File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1212<a href =" #jump11 " target =" _self " >11、mv(移动文件)</a ><br >
1313<a href =" #jump12 " target =" _self " >12、whereis(搜索命令)</a ><br >
1414<a href =" #jump13 " target =" _self " >13、locate(按照文件名搜索普通文件)</a ><br >
15+ <a href =" #jump14 " target =" _self " >14、tar(打包与解打包)</a ><br >
16+ <a href =" #jump15 " target =" _self " >15、sync(刷新文件系统缓冲区)</a ><br >
1517
1618## <span id = " jump1 " >1、ls(list查看)</span >
1719** ls [ 选项] [ 文件名/目录名 ] **
7880* locate inittab
7981
8082![ ] ( https://github.com/daacheng/PythonBasic/blob/master/pic/linux/linuxcmd_locate.png )
83+ ## <span id = " jump14 " >14、tar(打包与解打包)</span >
84+ ** 打包: tar -cvf 压缩包名 源文件**
85+ * -c:打包
86+ * -v:显示打包文件过程
87+ * -f:指定压缩包的文件名
88+
89+ ** 解打包(.tar):tar xvf 压缩包**
90+ * -x:解打包
91+ * -v:显示打包文件过程
92+ * -f:指定压缩包的文件名
93+
94+ ** 解打包(.gz):tar zxvf 压缩包**
95+
96+ ![ ] ( https://github.com/daacheng/PythonBasic/blob/master/pic/linux/tar1.png )
97+ ## <span id = " jump15 " >15、sync(刷新文件系统缓冲区)</span >
98+ 计算机上保存数据其实是先在内存中保存一定时间,再写入硬盘。这其实是一种缓存机制,当在内存中保存的数据需要被读取的时候,从内存中读取要比从硬盘中读取快得多。
99+
100+ 不过,如果数据还没有来得及保存到硬盘中,就发生了突然岩机(比如断电)的情况,数据就会丟失。
101+
102+ sync 命令的作用就是把内存中的数据强制向硬盘中保存。这个命令在常规关机的命令中其实会自动执行,但如果不放心,则应该在关机或重启之前手工执行几次,避免数据丟失。
You can’t perform that action at this time.
0 commit comments