Linux访问U盘 移动硬盘数据

Linux(CentOS)挂载U盘、移动硬盘以及文件拷贝、备份
http://hellopyl.blog.51cto.com/4271020/932639

以下操作均在root下执行的。

U盘挂载
1. mkdir /mnt/usb //创建一个目录,用于挂载U盘;
2. fdisk -l //查看系统中挂载的U盘,若系统有一块硬盘sdb1 代表你的U盘,/dev/sdb1表明机器已识别U盘;
3. mount /dev/sdb1 /mnt/usb //把U盘/dev/sdb1挂到/mnt/usb目录下;
4. cd /mnt/usb //进入U盘目录,即可查看U盘里内容
5. umount /mnt/usb 或者 umount /dev/sdb1 //卸载U盘

挂载移动硬盘
mount: unknown filesystem type ‘ntfs’。
我们平时用的移动硬盘是NTFS格式的,linux默认情况下是不支持NTFS分区,所以需要在linux下安装第三方的插件ntfs-3g

Linux Filesystem Hierarchy

/mnt: Mount point for a temporarily mounted filesystem. This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run. This directory must not be used by installation programs: a suitable temporary directory not in use by the system must be used instead. The /mnt Directory.

/media : Mount point for removeable media. This directory contains subdirectories which are used as mount points for removeable media such as floppy disks, cdroms and zip disks.

/dev:/dev is the location of special or device files. It is a very interesting directory that highlights one important aspect of the Linux filesystem - everything is a file or a directory.

/usr :


命令:
pwd
mkdir
fdisk
mount | umount
rm -rf gcc-5.3.0
cp -r /mnt/usb/gcc-5.3.0 /usr/local/src
tar
http://www.cyberciti.biz/faq/howto-open-a-tar-gz-file-in-linux-unix/
http://askubuntu.com/questions/25347/what-command-do-i-need-to-unzip-extract-a-tar-gz-file
http://www.binarytides.com/linux-tar-command/

tar碰到的问题:Cannot change ownership to uid 16446, gid 50: Operation not permitted.
https://www.krenger.ch/blog/linux-tar-cannot-change-ownership-to-permission-denied/
http://www.zyxware.com/articles/2713/untar-without-running-into-cannot-change-ownership-to-uid-nnn-gid-nnn-disk-quota-exceeded-on-whmcpanel-vps-account

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值