mv command:unable to remove target: Is a director
2015-06-14 22:31
309 查看
mv command:unable to remove target: Is a director
This is somewhat simple as long as we understand the concept. mv or move does not actually move the file/folder to another location within the same device, it merely replaces the pointer in the first sector of your device. The pointer (in inode table) will be moved, but nothing is actually being copied. This will work as long as you stay within the same media/device.Now, when you try to move files from one device to another (/dev/sda1 to /dev/sdb1) you will run into “inter-device move failed, unable to remove target: Is a directory” error. This happens when mv has to actually move your data to another device, but cannot remove the inode/pointer, because if it did then there will be no data to fall back to, and if it didn’t then mv operation is not really complete because we will end up with data in source. Damned if you do and damned if you don’t, so it’s wise not to do it to begin with!
In such situation cp is best. Copy your data over and then remove your source manually.
cp -r /media/usb2/clone/ /media/usb1
相关文章推荐
- php匹配指定标签的内容
- 设计模式-创建型模式#建造者模式Builder
- hadoop任务提交过程
- leetcode之Binary Tree Level Order Traversal
- 大数据可视化极速BI Tableau Server9视频培训
- ucore操作系统lab2实验报告
- win32 简单画图
- Android 坐标常识
- hdoj 1241 Oil Deposits
- 写在入职3个月
- ImageView的scaleType设置不当,导致使用Glide时出现OOM
- 自适应网页设计
- Android_照相机Camera_调用系统照相机返回data为空
- 软件工程课堂作业(七)续——电梯调度之整体设计
- QQ面向对象设计
- 批量修改文件名
- 团队作业—第四周—面向对象程序设计
- python对xlsx表格的操作
- 科技博客的价值
- mongodb学习