root@ubuntu-server:/media# mount -t unionfs -o dirs=/media/rw=rw:/media/feisty=ro unionfs /media/unionfs
root@ubuntu-server:/media# cd unionfs/
root@ubuntu-server:/media/unionfs# ls
boot etc initrd media opt root srv tmp var
bin dev home lib mnt proc sbin sys usr
root@ubuntu-server:/media/unionfs# cd usr
root@ubuntu-server:/media/unionfs/usr# ls
bin games include lib local sbin share src
root@ubuntu-server:/media/unionfs/usr# touch a
root@ubuntu-server:/media/unionfs/usr# cd ..
root@ubuntu-server:/media/unionfs# cd ..
root@ubuntu-server:/media# umount unionfs/
root@ubuntu-server:/media# ls
cdrom feisty hda5 hda6 hda7 hda8 nfs rw unionfs
root@ubuntu-server:/media# cd rw/
root@ubuntu-server:/media/rw# ls
usr
root@ubuntu-server:/media/rw# find .
.
./usr
./usr/a
root@ubuntu-server:/media# cd unionfs/
root@ubuntu-server:/media/unionfs# ls
boot etc initrd media opt root srv tmp var
bin dev home lib mnt proc sbin sys usr
root@ubuntu-server:/media/unionfs# cd usr
root@ubuntu-server:/media/unionfs/usr# ls
bin games include lib local sbin share src
root@ubuntu-server:/media/unionfs/usr# touch a
root@ubuntu-server:/media/unionfs/usr# cd ..
root@ubuntu-server:/media/unionfs# cd ..
root@ubuntu-server:/media# umount unionfs/
root@ubuntu-server:/media# ls
cdrom feisty hda5 hda6 hda7 hda8 nfs rw unionfs
root@ubuntu-server:/media# cd rw/
root@ubuntu-server:/media/rw# ls
usr
root@ubuntu-server:/media/rw# find .
.
./usr
./usr/a
本文展示了如何在Ubuntu系统中使用UnionFS文件系统进行文件管理。通过具体的命令操作,如挂载、创建文件及目录切换等,详细介绍了UnionFS的功能及其实现方式。
743

被折叠的 条评论
为什么被折叠?



