• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-145  評論-173  文章-70  trackbacks-0
            前段時間重裝了系統(tǒng),伴隨而來的是硬盤分區(qū)的變化和配置問題。具體來說就是,我使用了Acronis Disk Director Suite軟件,將原來安裝在ext4下面的Ubuntu給格式化掉了,因為原來的該Ubuntu因為更新內(nèi)核掛掉了,圖形界面不可用,對我來說,目前使用圖形界面還是很有必要的。在經(jīng)歷過多次嘗試之后,我還是放棄了找回這個Ubuntu,而直接選擇了重裝,雖然現(xiàn)在有點后悔為何當(dāng)初使用弱爆的wubi安裝,導(dǎo)致現(xiàn)在每次進(jìn)入啟動界面都要先進(jìn)入windows引導(dǎo)界面選擇Ubuntu,再啟動grub來選擇Ubuntu(導(dǎo)致其實可以在第一個界面中選擇Ubuntu,后面一個又選回去Win7)。早知道如此,當(dāng)初或許會不給自己留退路,直接搞個Ubuntu的硬盤安裝算了,少了很多麻煩,而且更省事。(這個在文章http://www.shnenglu.com/deercoder/archive/2011/09/11/155572.html中也有所描述,權(quán)限的問題還是不好解決,畢竟不是在Linux下面的文件系統(tǒng)下直接進(jìn)行操作)。

            廢話說了很多,問題出來了。每次啟動后,都要手動選擇掛載各個盤,比如fun盤,learn盤,來聽聽音樂,看看電子書啥的。如果不掛載的話,我的banshee就不能打開列表中的音樂,幾回下來很麻煩,為此嘗試每次啟動后手動掛載變?yōu)樽詣踊倪^程。

            在Google,baidu之后,覺得效果不大理想,主要是說的東西太多,不是我想要的,或者說內(nèi)容太雜了。于是乎看看說明文檔,主要有兩個部分,一個是命令mount,另外一個是fstab,分別看了一點之后,開始嘗試。
            (以下操作最好都在sudo下面進(jìn)行,否則可能會有權(quán)限問題)
            現(xiàn)備份文件/etc/fstab,然后編輯該文件。觀察樣例形式,找到了
             <file system> <mount point>   <type>  <options>       <dump>  <pass>
            上面這種說明形式,以及實例中關(guān)于proc的例子。
            proc            /proc           proc    nodev,noexec,nosuid 0       0

            于是乎試著使用自己的方式來改寫。sudo fdisk -l查看硬盤信息.
              Device Boot      Start         End      Blocks   Id  System
            /dev/sda1   *           1        7572    60820168+   7  HPFS/NTFS
            Partition 1 does not end on cylinder boundary.
            /dev/sda2            7572       11494    31498240    7  HPFS/NTFS
            Partition 2 does not end on cylinder boundary.
            /dev/sda3           11494       26506   120588288+   5  Extended
            Partition 3 does not end on cylinder boundary.
            /dev/sda4           26507       30401    31283280    7  HPFS/NTFS
            Partition 4 does not end on cylinder boundary.
            /dev/sda5           11494       16715    41943040    7  HPFS/NTFS
            /dev/sda6           16716       21937    41943040    7  HPFS/NTFS
            /dev/sda7           21937       26506    36700160    7  HPFS/NTFS
            然后在逐個掛載分區(qū),看看哪個是對應(yīng)的learn盤,fun盤,首先在/media下面新建一個文件,比如test,然后執(zhí)行命令:
            sudo mount /dev/sda1 /media/test
            通過對掛載之后內(nèi)容的判斷,知道上面的分區(qū)分別是哪些盤,然后就好說了。

            編輯/etc/fstab文件,在最后面加入我要開機(jī)自動掛載的盤的配置信息,如下:
            /dev/sda4    /media/Code    ntfs    nodev,noexec,nosuid 0      0    
            /dev/sda5     /media/Learn   ntfs    nodev,noexec,nosuid 0      0
            /dev/sda6    /media/Fun     ntfs    nodev,noexec,nosuid 0     0
            唯一一點需要注意的就是文件類型,這里我的盤都是ntfs類型的,所以通過查看文檔知道有該類型(不知道為何開始使用hpfs也是OK的,后面就不行了),在經(jīng)過幾次測試之后,發(fā)現(xiàn)出現(xiàn)了類型錯誤。

            信息錯誤可以有dmesg | tail來查看。

            在找到類型錯誤后,修改位ntfs,即可正確的掛載。

            然后掛載的話就直接使用sudo mount /media/Fun ......即可。
            當(dāng)前,注意由于配置文件中有/media/Code......文件夾,所以需要在/media文件夾下面新建相應(yīng)的文件夾,否則會失敗,注意還要是管理員權(quán)限。

            最后,注銷后再次進(jìn)入,就能夠看到自動掛載的盤符了,而且,此時還不能umount掉哦,提示不是root用戶。至此,達(dá)到了第一個目的了,能夠開機(jī)自動掛載。
            如果想要使用更加個性化的選項和操作,可以查看參考資料,另外,Man文檔中有很多有用的信息,看文檔是最快,最直接的方式。

            如果想要取消掛載的話,直接使用umount命令即可。比如取下掛載fun,則使用命令:sudo umount /media/fun即可。

            P.S: 如何掛載ISO文檔呢?之前下載了無損音樂,格式是ISO鏡像,不想解壓,那么如何mount上去呢?
            Key:
             sudo mount *.iso /mnt -o loop(將*.iso換成你的那個iso所在的路徑即可,另外,也不一定要掛載在mnt目錄下面,可以另外新建一個文件夾,類似于前面在media下面新建Fun,Learn等文件夾一樣。)

            P.S.S: 在終端輸入命令之后,如果想在前面加入sudo怎么辦?還要移動方向鍵來選擇插入點,多麻煩啊?
            Key:
            使用Ctrl+A(不管大小寫)鍵即可跳轉(zhuǎn)到第一個字符,從而輸入sudo后回車即可。

            修改:上面的描述在實際運行的時候,能夠開機(jī)的時候mount,但是今天發(fā)現(xiàn),直接用Banshee來打開音樂的話,還是會出現(xiàn)問題,就像沒有mount一樣,不能打開文件,所以懷疑是權(quán)限問題。再次閱讀了man mount和man fstab的資料(主要資料在man mount中),修改了相應(yīng)的權(quán)限。能夠?qū)崿F(xiàn)mount的時候打開文件了,而且是開機(jī)自動mount。

            修改文件如下:
            proc            /proc           proc    nodev,noexec,nosuid 0       0
            /host/ubuntu/disks/root.disk /               ext4    loop,errors=remount-ro 0       1
            /host/ubuntu/disks/swap.disk none            swap    loop,sw         0       0
            /dev/sda4       /media/Code    ntfs     users,auto,rw,dev,exec,umask=002     0   0
            /dev/sda5       /media/Learn   ntfs     users,auto,rw,dev,exec,umask=002     0   0 
            /dev/sda6       /media/Fun     ntfs     users,auto,rw,dev,exec,umask=002     0   0
            修改后的option字段增加了很多設(shè)置,具體來說就是:
            users:表示任何用戶都能夠umount,之前的設(shè)置不能umount,只能在命令行下面使用sudo權(quán)限才能使用。
            rw:表示擁有讀寫權(quán)限。
            auto:Can be mounted with the -a option.(使用mount -a的時候能夠吧fstab中的所有自動mount上去)
            dev: Interpret character or block special devices on the filesystem.
            exec:可執(zhí)行權(quán)限
            umask以及fmask:對于文件和文件目錄的權(quán)限設(shè)置。


            下面是一個資料中關(guān)于fstab的詳細(xì)解釋,在其中有更詳細(xì)的解釋和說明(How to fstab)(http://ubuntuforums.org/showthread.php?t=283131)
            摘錄部分資料:

            defaults = rw, suid, dev, exec, auto, nouser, and async.

            Options for a separate /home : nodev,nosuid,relatime

            My recommended options for removable (USB) drives are in green.

            auto= mounted at boot
            noauto= not mounted at boot

            user= when mounted the mount point is owned by the user who mounted the partition
            users= when mounted the mount point is owned by the user who mounted the partition and the group users

            ro= read only
            rw= read/write

            說明:option字段中,即上面的 users,auto,rw,dev,exec,umask=002部分,是使用逗號間隔的一個設(shè)置,其中auto是在啟動的時候自動mount,而noauto則是在啟動的時候不mount(可見之前noauto實際上還是沒有mount上去吧,這也解釋了為何不能打開,雖然可以看見盤符,能夠進(jìn)去,但是以前保存的列表還是不能打開文件,不過進(jìn)入盤符倒是可以的。) 

            users能夠umount,只要是使用者即可,不一定要是root。

            掛載點的問題:
            掛載在/mnt下面的話,不會出現(xiàn)在Places和Desktop中,而掛載在/media則會出現(xiàn)在桌面和位置上面。(默認(rèn)的是在media下面,這也是為何在菜單中點擊某個盤的時候?qū)崿F(xiàn)掛載,然后在/media下面會出現(xiàn)相應(yīng)的盤符,而不是在/mnt下面,其實,可以把ISO文件掛載在/mnt下面,硬盤分區(qū)掛載在/media下面)
            1. /mnt Typically used for fixed hard drives HD/SCSI. If you mount your hard drive in /mnt it will NOT show in "Places" and your Desktop.
            2. /media Typically used for removable media (CD/DVD/USB/Zip). If you mount your hard drive in /media it WILL show in "Places" and your Desktop.

            修改2:


            今天在VBox中下載的視頻無法拷貝到掛載的盤,后來發(fā)現(xiàn),是因為上次修改了fstab的原因,經(jīng)過多次測試,終于知道問題處在umask上面,再次修改,將umask修改位0000即可。注意:umask會奪去默認(rèn)的權(quán)限,比如UNIX上面創(chuàng)建一個文件默認(rèn)的是644,這個字段的作用就是:
            設(shè)定這個盤符(或者文件)的存取權(quán)限。之前的umask位004的情況,只能夠讀取,而不能夠?qū)懭搿T蚓驮谶@里!



            最后,附上man文檔中關(guān)于這些option的一些設(shè)置:

               The following options apply to any filesystem  that  is being  mounted
                   (but  not every filesystem actually honors them - e.g., the sync option
                   today has effect only for ext2, ext3, fat, vfat and ufs):
                   async  All I/O to the filesystem should be  done  asynchronously.  (See
                 also the sync option.)
                   atime  Update  inode access time for each access. See also the stricta‐
                 time mount option.
                   noatime
                 Do not update inode access times on this filesystem  (e.g,  for
                 faster access on the news spool to speed up news servers).
                   auto   Can be mounted with the -a option.(開機(jī)自動mount)
                   noauto Can  only  be  mounted  explicitly (i.e., the -a option will not
                 cause the filesystem to be mounted).
                   context=context,  fscontext=context,  defcontext=context  and  rootcon‐
                   text=context
                 The  context= option is useful when mounting filesystems that do
                 not support extended attributes, such as a floppy or  hard  disk
                 formatted  with  VFAT,  or systems that are not normally running
                 under SELinux, such as an ext3 formatted disk from a non-SELinux
                 workstation. You can also use context= on filesystems you do not
                 trust, such as a floppy. It also helps  in  compatibility  with
                 xattr-supporting filesystems on earlier 2.4.<x> kernel versions.
                 Even where xattrs are supported, you can save time not having to
                 label  every file by assigning the entire disk one security con‐
                 text.
                 A commonly used  option  for  removable  media  is  context=sys‐
                 tem_u:object_r:removable_t.
                 Two  other options are fscontext= and defcontext=, both of which
                 are mutually exclusive of the context option. This means you can
                 use fscontext and defcontext with each other, but neither can be
                 used with context.
                 The fscontext= option works for all filesystems, regardless  of
                 their  xattr  support. The fscontext option sets the overarching
                 filesystem label to a specific security context. This filesystem
                 label  is  separate  from the individual labels on the files. It
                 represents the entire filesystem for certain kinds of permission
                 checks,  such as during mount or file creation.  Individual file
                 labels are still obtained from the xattrs  on  the  files  them‐
                 selves.  The  context option actually sets the aggregate context
                 that fscontext provides, in addition to supplying the same label
                 for individual files.
                 You  can set  the  default security context for unlabeled files
                 using defcontext= option. This overrides the value set for unla‐
                 beled  files  in the policy and requires a filesystem that sup‐
                 ports xattr labeling.
                 The rootcontext= option allows you to explicitly label the  root
                 inode of a FS being mounted before that FS or inode because vis‐
                 able to userspace. This was found to be useful for  things  like
                 stateless linux.
                 For more details, see selinux(8)
                   defaults
                 Use  default  options:  rw,  suid,  dev, exec, auto, nouser, and
                 async.
                   dev    Interpret character or block special devices on the filesystem.
                   nodev  Do not interpret character or block special devices on the  file
                 system.
                   diratime
                 Update  directory inode access times on this filesystem. This is
                 the default.
                   nodiratime
                 Do not update directory inode access times on this filesystem.
                   dirsync
                 All directory updates within the filesystem should be done  syn‐
                 chronously.   This  affects  the following system calls: creat,
                 link, unlink, symlink, mkdir, rmdir, mknod and rename.
                   exec   Permit execution of binaries.
                   noexec Do not allow direct execution of any  binaries  on  the  mounted
                 filesystem.   (Until  recently  it  was possible to run binaries
                 anyway using a command like /lib/ld*.so /mnt/binary. This  trick
                 fails since Linux 2.4.25 / 2.6.0.)
                   group  Allow  an ordinary (i.e., non-root) user to mount the filesystem
                 if one of his groups matches the group  of  the device.   This
                 option  implies  the options nosuid and nodev (unless overridden
                 by subsequent options, as in the option line group,dev,suid).
                   encryption
                 Specifies an encryption algorithm to use.  Used  in  conjunction
                 with the loop option.
                   keybits
                 Specifies  the key size to use for an encryption algorithm. Used
                 in conjunction with the loop and encryption options.  nofail  Do
                 not  report  errors for this device if it does not exist.  iver‐
                 sion Every time the inode is modified, the i_version field  will
                 be incremented.
                   noiversion
                 Do not increment the i_version inode field.
                   mand   Allow mandatory locks on this filesystem. See fcntl(2).
                   nomand Do not allow mandatory locks on this filesystem.
                   _netdev
                 The  filesystem resides on a device that requires network access
                 (used to prevent the  system  from  attempting  to  mount  these
                 filesystems until the network has been enabled on the system).
                   nofail Do not report errors for this device if it does not exist.
                   relatime
                 Update  inode  access  times  relative to modify or change time.
                 Access time is only updated if the previous access time was ear‐
                 lier  than  the current modify or change time. (Similar to noat‐
                 ime, but doesn't break mutt or other applications that  need  to
                 know  if a  file has been read since the last time it was modi‐
                 fied.)
                   norelatime
                 Do not use relatime feature.  See  also  the  strictatime  mount
                 option.
                   strictatime
                 Allows  to  explicitly requesting full atime updates. This makes
                 it possible for kernel to defaults to relatime  or  noatime  but
                 still allow userspace to override it. For more details about the
                 default system mount options see /proc/mounts.
                   nostrictatime
                 Use  the kernel's  default  behaviour  for  inode  access  time
                 updates.
                   suid   Allow  set-user-identifier  or set-group-identifier bits to take
                 effect.
                   nosuid Do not allow set-user-identifier or set-group-identifier bits to
                 take  effect.  (This seems safe, but is in fact rather unsafe if
                 you have suidperl(1) installed.)
                   owner  Allow an ordinary (i.e., non-root) user to mount the  filesystem
                 if  he  is  the  owner  of  the device.  This option implies the
                 options  nosuid  and  nodev  (unless  overridden by  subsequent
                 options, as in the option line owner,dev,suid).
                   remount
                 Attempt  to remount an already-mounted filesystem.  This is com‐
                 monly used to change the mount flags  for  a  filesystem,  espe‐
                 cially  to  make a  readonly  filesystem writeable. It does not
                 change device or mount point.
                 The remount functionality follows the standard way how the mount
                 command  works  with options from fstab. It means the mount com‐
                 mand doesn't read fstab (or mtab) only when a device and dir are
                 fully specified.
                 mount -o remount,rw /dev/foo /dir
                 After this call all old mount options are replaced and arbitrary
                 stuff from fstab is ignored, except the loop=  option  which  is
                 internally generated and maintained by the mount command.
                 mount -o remount,rw  /dir
                 After  this  call  mount reads fstab (or mtab) and merges these
                 options with options from command line ( -o ).
                   ro     Mount the filesystem read-only.
                   rw     Mount the filesystem read-write.
                   sync   All I/O to the filesystem should be done synchronously. In  case
                 of  media  with  limited number of write cycles (e.g. some flash
                 drives) "sync" may cause life-cycle shortening.
                   user   Allow an ordinary user to mount the filesystem.  The name of the
                 mounting user  is  written  to  mtab so that he can unmount the
                 filesystem again.   This option implies  the  options  noexec,
                 nosuid,  and  nodev (unless overridden by subsequent options, as
                 in the option line user,exec,dev,suid).
                   nouser Forbid an ordinary (i.e., non-root) user to mount  the  filesys‐
                 tem.  This is the default.
                   users  Allow  every  user  to  mount  and unmount the filesystem.  This
                 option implies the options noexec,  nosuid,  and nodev  (unless
                 overridden   by  subsequent  options,  as  in  the  option  line
                 users,exec,dev,suid).


            附參考資料:
            我們在linux中常常用mount命令把硬盤分區(qū)或者光盤掛載到文件系統(tǒng)中。/etc/fstab就是在開機(jī)引導(dǎo)的時候自動掛載到linux的文件系統(tǒng)。

            在linux中/etc/fstab的數(shù)據(jù)項如下所示:

            /dev/device   mountpoint   type   rules   dump   order

            設(shè)備名稱        掛載點          分區(qū)類型   掛載選項     dump選項    fsck選項

            例如這是一個普通的/etc/fstab:

            /dev/hda2     /                    ext3        defaults   0 1

            /dev/hda3     swap             swap      defaults   0 0

            /dev/hda5     /usr               ext3        defaults   0 0

            /dev/fdo        /mnt/flopy     ext3        noauto     0 0

            /dev/cdrom    /mnt/cdrom   iso9660  noauto,ro 0 0

            (1)設(shè)備名稱
            /dev/device就是需要掛載的設(shè)備,/hda2就是第一個IDE插槽上的主硬盤的第二個分區(qū)。如果是第二個IDE插槽主硬盤的第三個分區(qū),那就是/dev/hdc3,具體可以在linux下使用fdisk -l  查看。

            (2)掛載點
            mountpoint 就是掛載點。/、 /usr、 swap 都是系統(tǒng)安裝時分區(qū)的默認(rèn)掛載點。
            如果你要掛載一個新設(shè)備,你就要好好想想了,因為這個新設(shè)備將作為文件系統(tǒng)永久的一部分,需要根據(jù)FSSTND(文件系統(tǒng)標(biāo)準(zhǔn)),以及它的作用,用戶需求來決定。比如你想把它做為一個共享資源,放在/home下面就是一個不錯選擇。

            (3)分區(qū)類型
            type 是指文件系統(tǒng)類型,下面列舉幾個常用的:

            Linux file systems: ext2, ext3, jfs, reiserfs, reiser4, xfs, swap.
            Windows:
            vfat = FAT 32, FAT 16
            ntfs= NTFS
            Note: For NTFS rw ntfs-3g
            CD/DVD/iso: iso9660
            Network file systems:
            nfs: server:/shared_directory /mnt/nfs nfs <options> 0 0
            smb: //win_box/shared_folder /mnt/samba smbfs rw,credentials=/home/user_name/winbox-credentials.txt 0 0
            auto: The file system type (ext3, iso9660, etc) it detected automatically. Usually works. Used for removable devices (CD/DVD, Floppy drives, or USB/Flash drives) as the file system may vary on thesedevices.

            (4)掛載選項
            rules 是指掛載時的規(guī)則。下面列舉幾個常用的:
            auto 開機(jī)自動掛載
            default 按照大多數(shù)永久文件系統(tǒng)的缺省值設(shè)置掛載定義
            noauto 開機(jī)不自動掛載
            nouser 只有超級用戶可以掛載
            ro 按只讀權(quán)限掛載
            rw 按可讀可寫權(quán)限掛載
            user 任何用戶都可以掛載
            請注意光驅(qū)和軟驅(qū)只有在裝有介質(zhì)時才可以進(jìn)行掛載,因此它是noauto

            (5)dump選項
            這一項為0,就表示從不備份。如果上次用dump備份,將顯示備份至今的天數(shù)。

            (6)fsck選項
            order 指fsck(啟動時fsck檢查的順序)。為0就表示不檢查,(/)分區(qū)永遠(yuǎn)都是1,其它的分區(qū)只能從2開始,當(dāng)數(shù)字相同就同時檢查(但不能有兩1)。

            如果我要把第二個IDE插槽主硬盤上的windows C 區(qū)掛到文件系統(tǒng)中,那么數(shù)據(jù)項是:

            /dev/hdc1 /c vfat defaults 0 0

            (/c 是事先建立的文件夾,作為c盤的掛載點。)

            當(dāng)你修改了/etc/fstab后,一定要重新引導(dǎo)系統(tǒng)才會有效。

            fstab中存放了與分區(qū)有關(guān)的重要信息,其中每一行為一個分區(qū)記錄,每一行又可分為六個部份,下面以/dev/hda7 / ext2 defaults 1 1為例逐個說明:

            1. 第一項是您想要mount的儲存裝置的實體位置,如hdb或如上例的/dev/hda7。

            2. 第二項就是您想要將其加入至哪個目錄位置,如/home或如上例的/,這其實就是在安裝時提示的掛入點。

            3. 第三項就是所謂的local filesystem,其包含了以下格式:如ext、ext2、msdos、iso9660、nfs、swap等,或如上例的ext2,可以參見/prco/filesystems說明。

            4. 第四項就是您mount時,所要設(shè)定的狀態(tài),如ro(只讀)或如上例的defaults(包括了其它參數(shù)如rw、suid、exec、auto、nouser、async),可以參見「mount nfs」。

            5. 第五項是提供DUMP功能,在系統(tǒng)DUMP時是否需要BACKUP的標(biāo)志位,其內(nèi)定值是0。

            6. 第六項是設(shè)定此filesystem是否要在開機(jī)時做check的動作,除了root的filesystem其必要的check為1之外,其它皆可視需要設(shè)定,內(nèi)定值是0。

            ?

            參考鏈接:

            http://diamonder.blog.51cto.com/159220/282542

            http://blogold.chinaunix.net/u1/55527/showart_449692.html

            (設(shè)置fstab需要參考的資料)
            http://ubuntuforums.org/showthread.php?t=283131

            http://www.tuxfiles.org/linuxhelp/fstab.html
            注意主要的問題就在于第四列中的option設(shè)置,這里引用上面一文中的設(shè)置內(nèi)容:

            4th column: Mount options >

            The fourth column in fstab lists all the mount options for the device or partition. This is also the most confusing column in the fstab file, but knowing what some of the most common options mean, saves you from a big headache. Yes, there are many options available, but I'll take a look at the most widely used ones only. For more information, check out the man page of mount.

            auto and noauto With the auto option, the device will be mounted automatically (at bootup, just like I told you a bit earlier, or when you issue the mount -a command).auto is the default option. If you don't want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be mounted only explicitly.

            user and nouser These are very useful options. The user option allows normal users to mount the device, whereas nouser lets only the root to mount the device. nouseris the default, which is a major cause of headache for new Linux users. If you're not able to mount your cdrom, floppy, Windows partition, or something else as a normal user, add the user option into /etc/fstab.

            exec and noexec exec lets you execute binaries that are on that partition, whereas noexec doesn't let you do that. noexec might be useful for a partition that contains binaries you don't want to execute on your system, or that can't even be executed on your system. This might be the case of a Windows partition.

            exec is the default option, which is a good thing. Imagine what would happen if you accidentally used the noexec option with your Linux root partition...

            ro Mount the filesystem read-only.

            rw Mount the filesystem read-write. Again, using this option might cure the headache of many new Linux users who are tearing their hair off because they can't write to their floppies, Windows partitions, or something else.

            sync and async How the input and output to the filesystem should be done. sync means it's done synchronously. If you look at the example fstab, you'll notice that this is the option used with the floppy. In plain English, this means that when you, for example, copy a file to the floppy, the changes are physically written to the floppy at the same time you issue the copy command.

            However, if you have the async option in /etc/fstab, input and output is done asynchronously. Now when you copy a file to the floppy, the changes may be physically written to it long time after issuing the command. This isn't bad, and may sometimes be favorable, but can cause some nasty accidents: if you just remove the floppy without unmounting it first, the copied file may not physically exist on the floppy yet!

            async is the default. However, it may be wise to use sync with the floppy, especially if you're used to the way it's done in Windows and have a tendency to remove floppies before unmounting them first.

            defaults Uses the default options that are rw, suid, dev, exec, auto, nouser, and async.


            另外,附上一點小技巧,如何保存man文檔?
            man command | col -b > output.txt
            如,要把ls命令的man頁輸出到ls.txt文件,只需要:
              man ls | col -b > ls.txt


            posted on 2011-10-04 00:20 deercoder 閱讀(23763) 評論(4)  編輯 收藏 引用 所屬分類: Unix/Linux

            評論:
            # re: Ubuntu下硬盤的自動掛載 2011-10-04 11:57 | 陳梓瀚(vczh)
            真麻煩啊,還要自己掛載。  回復(fù)  更多評論
              
            # re: Ubuntu下硬盤的自動掛載 2011-10-04 12:07 | 劉暢
            @陳梓瀚(vczh)
            還好吧,寫好配置文件就直接OK了,每次啟動就會自動掛載滴~  回復(fù)  更多評論
              
            # re: Ubuntu下硬盤的自動掛載 2011-10-04 13:06 | 博洋家紡
            還要自己掛載  回復(fù)  更多評論
              
            # re: Ubuntu下硬盤的自動掛載 2011-10-04 18:24 | 釹鐵硼磁鐵工廠
            很多年沒有玩這個了,學(xué)習(xí)了。  回復(fù)  更多評論
              
            久久精品人人做人人爽电影蜜月 | 日本久久中文字幕| 久久99久国产麻精品66| 97久久精品人人做人人爽| 模特私拍国产精品久久| 国产精品日韩深夜福利久久| 久久久国产精品亚洲一区| 99久久精品国产综合一区| 午夜精品久久影院蜜桃| 久久久国产乱子伦精品作者| 一本一道久久a久久精品综合| 久久成人精品| 久久精品夜色噜噜亚洲A∨| 久久亚洲综合色一区二区三区| 久久99精品久久久久子伦| 久久ZYZ资源站无码中文动漫| 久久精品二区| 欧美日韩中文字幕久久伊人| 思思久久99热只有频精品66| 国产福利电影一区二区三区久久久久成人精品综合 | 精品综合久久久久久88小说| 亚洲色大成网站www久久九| 中文字幕乱码久久午夜| 狠狠精品干练久久久无码中文字幕| 一本色道久久99一综合| 久久精品成人免费国产片小草 | 99久久综合狠狠综合久久止| 久久久久亚洲Av无码专| 综合久久给合久久狠狠狠97色| 国产成人精品综合久久久| 久久A级毛片免费观看| 中文字幕无码免费久久| 久久夜色精品国产亚洲| 久久久久亚洲精品无码蜜桃| 午夜福利91久久福利| 久久久WWW免费人成精品| 久久精品国产精品青草| 无码8090精品久久一区| 久久婷婷色综合一区二区| 国产亚洲精品自在久久| 久久精品国产亚洲av日韩|