linuxÐÞ¸ÄÎļþÏÂÁîÓÐÄÄЩ
linuxÐÞ¸ÄÎļþÏÂÁîÓУº1¡¢chmod£¬ÓÃÓڸıäÎļþ»òĿ¼µÄȨÏÞ£»2¡¢chown£¬ÓÃÓڸıäÎļþ»òĿ¼µÄËùÓÐÕߣ»3¡¢chattr£¬ÓÃÓڸıäÎļþµÄÀ©Õ¹ÊôÐÔ£»4¡¢truncate£¬ÓÃÓڽضϻòÇå¿ÕÎļþ£»5¡¢touch£¬ÓÃÓÚ¸üÐÂÎļþµÄ»á¼ûºÍÐÞ¸Äʱ¼ä´Á£»6¡¢mv£¬ÓÃÓÚÒƶ¯»òÖØÃüÃûÎļþ£»7¡¢cp£¬ÓÃÓÚ¸´ÖÆÎļþ£»8¡¢rm£¬ÓÃÓÚɾ³ýÎļþ£»9¡¢ln£¬ÓÃÓÚ½¨Éè·ûºÅÁ´½ÓµÈµÈ¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºlinux6.4.3ϵͳ¡¢Dell G3µçÄÔ¡£
ÔÚLinuxϵͳÖУ¬ÓжàÖÖÏÂÁî¿ÉÒÔÓÃÀ´ÐÞ¸ÄÎļþÄÚÈÝ»òÊôÐÔ¡£ÒÔÏÂÊÇһЩ³£ÓõÄÎļþÐÞ¸ÄÏÂÁî¼°Æä¼òҪ˵Ã÷£º
chmod£º¸ÃÏÂÁîÓÃÓڸıäÎļþ»òĿ¼µÄȨÏÞ¡£Ëü¿ÉÒÔͨ¹ýÐÞ¸ÄÎļþµÄ»á¼û¡¢Ð´ÈëºÍÖ´ÐÐȨÏÞÀ´¿ØÖÆË¿ÉÒÔ»á¼û¸ÃÎļþ¡£ÀýÈ磬chmod +rwx file.txt½«Îļþfile.txtµÄȨÏÞÉèÖÃΪ¶ÁÈ¡¡¢Ð´ÈëºÍÖ´ÐÐËùÓÐÓû§¡£
chown£º¸ÃÏÂÁîÓÃÓڸıäÎļþ»òĿ¼µÄËùÓÐÕß¡£ÀýÈ磬chown user:group file.txt½«Îļþfile.txtµÄËùÓÐÕ߸ü¸ÄΪuser£¬ËùÊô×éΪgroup¡£
chattr£º¸ÃÏÂÁîÓÃÓڸıäÎļþµÄÀ©Õ¹ÊôÐÔ¡£ÀýÈ磬chattr +i file.txt½«Îļþfile.txtµÄÊôÐÔÉèÖÃΪ²»¿Éɾ³ý¡£
truncate£º¸ÃÏÂÁîÓÃÓڽضϻòÇå¿ÕÎļþ¡£ÀýÈ磬truncate -s 0 file.txt½«Îļþfile.txtµÄÄÚÈÝÇå¿Õ¡£
touch£º¸ÃÏÂÁîÓÃÓÚ¸üÐÂÎļþµÄ»á¼ûºÍÐÞ¸Äʱ¼ä´Á¡£ÀýÈ磬touch file.txt½«¸üÐÂÎļþfile.txtµÄʱ¼ä´Á£¬µ«²»»á¸Ä±äÎļþÄÚÈÝ¡£
mv£º¸ÃÏÂÁîÓÃÓÚÒƶ¯»òÖØÃüÃûÎļþ¡£ÀýÈ磬mv oldfile.txt newfile.txt½«Îļþoldfile.txtÖØÃüÃûΪnewfile.txt¡£
cp£º¸ÃÏÂÁîÓÃÓÚ¸´ÖÆÎļþ¡£ÀýÈ磬cp source.txt destination.txt½«source.txt¸´ÖÆΪdestination.txt¡£
rm£º¸ÃÏÂÁîÓÃÓÚɾ³ýÎļþ¡£ÀýÈ磬rm file.txt½«É¾³ýÎļþfile.txt¡£
ln£º¸ÃÏÂÁîÓÃÓÚ½¨Éè·ûºÅÁ´½Ó¡£ÀýÈ磬ln -s source.txt link.txt½«½¨ÉèÒ»¸öÖ¸Ïòsource.txtµÄ·ûºÅÁ´½Ólink.txt¡£
ÕâЩÏÂÁîÖ»ÊÇLinuxϵͳÖпÉÓÃÓÚÐÞ¸ÄÎļþµÄ²¿·ÖÏÂÁƾ֤ÏêϸÐèÇ󣬻¹¿ÉÒÔʹÓÃÆäËûÏÂÁîÀ´ÐÞ¸ÄÎļþÄÚÈÝ»òÊôÐÔ¡£ÔÚʹÓÃÕâЩÏÂÁîʱ£¬ÇëÎñ±ØСÐÄ£¬ÒÔÃâÎó²Ù×÷µ¼ÖÂÎļþɥʧ»òÊý¾ÝË𻵡£
ÒÔÉϾÍÊÇlinuxÐÞ¸ÄÎļþÏÂÁîÓÐÄÄЩµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡