Softlink / Symbolic link / Symlink

Masalah: Partition root korang penuh. So nak kena move folder korang ke path lain. Masalah timbul bila sistem korang takleh running klu korang ubah path korang. So macamana nak buat? Jawapan dia softlink.

Situasi aku sekarang aku nak ubah folder backup zimbra ke path lain. Sebab hardisk dah tak muat nak tampung saiz backup yang semakin membesar hari demi hari. Tapi kalau aku main ubah je confirm backup aku tak jalan. So cara dia kena buat soflink.

First step kita kena copy atau move dulu data/folder yang kita nak buat softlink tu ke directory baru. Dalam kes aku, aku kena move folder backup dan sekali isi dia (and all the permission and ownership every folders and files, cp -rp) dari /opt/zimbra/ ke /mnt/iscsi then aku nak buat softlink untuk folder “backup” kat dir /opt/zimbra/

Command: ln -s [path baru] [softlink]/

ln -s /mnt/iscsi/backup /opt/zimbra/

Sekarang ni kalau masuk /opt/zimbra then run cmd ls kita akan nampak folder backup kat situ. Tapi actually folder and data tu bukan kat situ. Folder sebenar adalah kat /mnt/iscsi/backup.

Advertisements
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s