UBUNTU

สำหรับท่านที่ต้องการจะบีบไฟล์หรือรวบรวมไฟล์ เพื่อจะย้ายไปที่อื่น เราสามารถใช้โปรแกรมบน linux ทีมีมาให้ใช้งานได้ทันที คือ tar และ gzip

ในขั้นแรกต้องทำการรวบรวมไฟล์ด้วย tar ก่อน โดยใช้คำสั่งดังนี้

#tar -cvf xyz.tar abc/

โดย xyz.tar คือไฟล์ที่ต้องการรวบรวมเป็น output

และ abc/ คือ subfolder ที่ต้องการจะรวบรวม

  • c คือการสร้าง (create file )
  • f คือไฟล์ที่ต้องการตั้งชื่อเช่น xyz.tar
  • v คือการแสดงให้เห็นขณะทำการทำงาน

เมื่อได้แล้ว เราก็มาบีบย่อให้เล็กลงโดยใช้ gzip

#gzip xyz.tar <---- สำหรับ gzip หากพิมพ์แค่นี้จะเป็นการบีบอัด แต่หากต้องการขยาย ต้องใส่ค่า parameter -d เข้าไปครับ

เท่านี้ก็จะได้ไฟล์ xyz.tar.gz ออกมาครับ

************************************************

และอีกแบบคือการใช้คำสั่ง tar ทั้งหมดในการสร้างครับ

รูปแบบดังนี้

#tar -zcvf  xyz.tar.gz  abc/

z คือตัวกำหนดให้มีการทำการย่อเป็น zip file ครับ และโครงสร้างเหมือนกับข้างบนเพียงแค่เพิ่มตัว z เท่านั้น

  • c คือการสร้าง (create file )
  • f คือไฟล์ที่ต้องการตั้งชื่อเช่น xyz.tar
  • v คือการแสดงให้เห็นขณะทำการทำงาน
  • z คือการย่อไฟล์อีกครั้งเป็นแบบ zip file

อีกรูปแบบหนึ่งชนิดการแบบอัดแบบ bz2 ก็สามารถสร้างได้ดังนี้

#tar -jcvf  xyz.tar.bz2 abc/

  • c คือการสร้าง (create file )
  • f คือไฟล์ที่ต้องการตั้งชื่อเช่น xyz.tar
  • v คือการแสดงให้เห็นขณะทำการทำงาน
  • j คือการย่อไฟล์อีกครั้งเป็นแบบ bz2

และก็เพิ่มวิธีการแตกไฟล์หน่อยแล้วกัน

สำหรับวิธีการขยายไฟล์ของ tar ใช้ดังนี้

#tar -vxf  xyz.tar

หรือ tar.gz

#tar -zvxf xyz.tar.gz

และสำหรับ ชนิด bz2 ก็ใช้แบบนี้

#tar -jxvf xyz.tar.bz2

edit @ 3 May 2009 22:54:07 by ((((((( I love Linux )))))))

สำหรับท่านที่ได้มีการติดตั้ง Linux และทำ multi boot ไว้ บนlinux จะติดตั้ง Grub ไว้ ทีนี้หากเราต้องการยกเลิก ออกจะทำอย่างไร
มีวิธีดังนี้ครับ

ใช้ MS-DOS/Windows 9x boot disk

In order to remove the GRUB bootloader from a Linux and Windows XP machine, boot with a Windows 9x startup disk or CD and execute the MS-DOS command:

fdisk /mbr


Using Windows XP boot disk

If you are booting using Windows XP/2000, type the following commands:
# fixmbr
# exit

Using Linux

You can also use dd command from Linux itself (it removes partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1

Just remove MBR, without the partition table (see comment below):
# dd if=/dev/null of=/dev/sdX bs=446 count=1

Replace /dev/hdX with your actual device name such as /dev/hda. Use fdisk -l command to find out device name:
# fdisk -l
ที่มา http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/
โดยปรกติเราจะมีการติดตั้งหมายเลขไอพี 1ชุด เพื่อใช้งาน แต่บางครั้งเราต้องการให้มี ip ที่สอง
เพื่อใช้งานบางอย่าง เราสามารถทำได้ดังนี้ครับ
เข้าไปแก้ไขไฟล์
nano /etc/network/interfaces
ซึ่งภายในไฟล์จะปรากฏข้อมูล ประมาณนี้นะครับ
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 eth0:1
iface eth0 inet static
address 192.168.122.1
netmask 255.255.255.0
network 192.168.122.0
broadcast 192.168.255.255
gateway 192.168.x.25x
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.x.25x
เราสามารเพิ่มคำสั่งต่อท้ายไปอีกดังนี้
iface eth0:1 inet static
address 192.168.202.1
netmask 255.255.255.0
network 192.168.202.0
broadcast 192.168.255.255
หรือ

auto eth0 eth0:1
iface eth0 inet static
address 192.168.3.10
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
gateway 192.168.3.1

iface eth0:1 inet static
address 10.0.3.10
netmask 255.255.255.0

เพียงเท่านี้เราก็ใช้ได้
edit @ 2007/08/01 13:46:44