×ðÁú¿­Ê±¹ÙÍøµÇ¼

linuxÖ»¶ÁÎļþÔõôÐÞ¸Ä

ÐÞ¸Ä linux ÖÐÖ»¶ÁÎļþµÄ°ì·¨ÈçÏ£º»ñµÃ root ȨÏÞ£ºsudo suÆôÓÃдȨÏÞ£ºchmod +w ±à¼­Îļþ£ºnano £¨¿ÉÑ¡£©½ûÓÃдȨÏÞ£ºchmod -w £¨¿ÉÑ¡£©ÉúÑĵ½ÐÂÎļþ£ºcp

ÐÞ¸Ä Linux ÖÐÖ»¶ÁÎļþµÄ°ì·¨

ÔÚ Linux ϵͳÖÐ £¬Ä¬ÈÏÇéÐÎÏÂijЩÎļþºÍĿ¼ÊÇÖ»¶ÁµÄ £¬ÕâÒâζ×ÅÄúÎÞ·¨Ö±½Ó¸ü¸ÄËüÃǵÄÄÚÈÝ¡£È»¶ø £¬¿ÉÒÔͨ¹ýÒÔÏ°취ÐÞ¸ÄÖ»¶ÁÎļþ»ò½«ÆäÄÚÈÝÉúÑĵ½ÐÂÎļþ£º

1. »ñµÃ root ȨÏÞ

ΪÁËÐÞ¸ÄÖ»¶ÁÎļþ £¬ÄúÐèÒª¾ßÓÐ root ȨÏÞ¡£Îª´Ë £¬Äú¿ÉÒÔÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁ

sudo su

µÇ¼ºó¸´ÖÆ

2. ÆôÓÃдȨÏÞ

ÏÖÔÚ £¬Äú¿ÉÒÔʹÓà chmod ÏÂÁîΪÎļþÆôÓÃдȨÏÞ¡£Óï·¨ÈçÏ£º

chmod +w 

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬ÒªÎªÃûΪ my_file.txt µÄÎļþÆôÓÃдȨÏÞ £¬ÇëÔËÐУº

chmod +w my_file.txt

µÇ¼ºó¸´ÖÆ

3. ±à¼­Îļþ

ÏÖÔÚÄúÒѾ­ÎªÎļþÆôÓÃÁËдȨÏÞ £¬Äú¿ÉÒÔʹÓÃÎı¾±à¼­Æ÷£¨ÀýÈç Nano »ò Vim£©±à¼­ÆäÄÚÈÝ¡£ÒªÊ¹Óà Nano ±à¼­Îļþ £¬ÇëÔËÐУº

nano my_file.txt

µÇ¼ºó¸´ÖÆ

¾ÙÐÐÍê¸ü¸Äºó £¬°´ Ctrl + X ÉúÑIJ¢Í˳ö±à¼­Æ÷¡£

4. ½ûÓÃдȨÏÞ£¨¿ÉÑ¡£©

ÈôÊÇÄú²»ÔÙÐèÒª¶ÔÎļþ¾ÙÐÐÐÞ¸Ä £¬¿ÉÒÔÔٴνûÓÃдȨÏÞÒÔÌá¸ßÇå¾²ÐÔ¡£Òª½ûÓÃдȨÏÞ £¬ÇëÔËÐУº

chmod -w 

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬ÒªÎª my_file.txt ½ûÓÃдȨÏÞ £¬ÇëÔËÐУº

chmod -w my_file.txt

µÇ¼ºó¸´ÖÆ

5. ÉúÑĵ½ÐÂÎļþ£¨¿ÉÑ¡£©

ÈôÊÇÄú²»ÏëÖ±½ÓÐÞ¸ÄÖ»¶ÁÎļþ £¬¿ÉÒÔ½«ÎļþµÄÄÚÈÝÉúÑĵ½Ò»¸öÐÂÎļþÖС£ÒªÉúÑĵ½ÐÂÎļþ £¬ÇëʹÓà cp ÏÂÁî¡£Óï·¨ÈçÏ£º

cp  

µÇ¼ºó¸´ÖÆ

ÀýÈç £¬Òª½« my_file.txt µÄÄÚÈÝÉúÑĵ½ my_file_new.txt ÖÐ £¬ÇëÔËÐУº

cp my_file.txt my_file_new.txt

µÇ¼ºó¸´ÖÆ

ÏÖÔÚ £¬Äú¿ÉÒÔ¶Ô my_file_new.txt ¾ÙÐб༭»òÐ޸ġ£

ÒÔÉϾÍÊÇlinuxÖ»¶ÁÎļþÔõôÐ޸ĵÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ