Change the behavior of the copy (cp) command overwrite the existing file without prompt

แก้ในไฟล์ $HOME/.bashrc ครับ เนื่องจาก redhat ใส่ alias cp=’cp -i’ ไว้ครับ


ดังนั้นแสดงว่าใส่ option -r ไม่มีความหมายครับ วิธีแก้ไขให้คอมเม้นด้วย # ที่ alias cp=’cp -i’ ครับ และทำการ Logout และ login เข้ามาใหม่ด้วยนะครับ และคราวนี้ท่านก็สามารถใช้งานคำสั่ง cp ด้วย option -f ได้แล้วครับ
ตัวอย่าง
#cp -f /file /existing file

Related posts:

  1. Find Out Which RPM Installed a Specific File by rpm or yum Command การตรวจสอบว่าไฟล์หรือคำสั่งต่างๆมาจาก package ไหนบ้าง สามารถทำได้ไม่ยาก โดยจะใช้คำสั่ง rpm หรือ yum...
  2. How to use wpa_cli command wpa_cli command เป็น command ที่มีอยู่ใน wpa_supplicant package ซึ่ง...
  3. การใช้ Man command เมื่อบทที่แล้วผมได้พูดถึงการใช้ help ไป 2 ตัวด้วยกัน คือ whatis และ...
  4. Force fsck on the next boot sequence เมื่อต้องการให้ Linux ทำ file system check ทุก partition...
  5. Map Of The Linux File System ผมมีรูปรายละเอีบดของ directory มาฝากครับ สำหรับมือใหม่ Ubuntu และสาวก Ubuntu ที่บางท่านที่ยังไม่ทราบรายละเอียดต่างๆของ...

You can leave a response, or trackback from your own site.

Leave a Reply