0

I am moving files from my CentOs disk to mounted USB drive as root.

My current working directory is /mnt/hdd/backupmy command is :

mv -v /home/haifzhan/20141215/*gz . > history.log

Error Messages on console:

mv: cannot create regular file `./20141215/filename_xxx.gz': Input/output error
mv: writing `./20141215/filename_yyy.gz': Input/output error 

My tracking history log in history.log that create by -v by command mv:

`/home/haifzhan/20141215/filename_xxx.gz' -> `./20141215/filename_xxx.gz'
`/home/haifzhan/20141215/filename_yyy.gz' -> `./20141215/filename_yyy.gz'

The destination folder details:

drwx------. 2 root   root          319488 May 13 16:46 20141215

Can anyone help? Thanks!

| improve this question | |
  • 1
    From the output it is trying to move the file onto itself. – Rob May 13 '15 at 20:12
  • I said my current directory is /mnt/hdd/backup , trying to move from /home/haifzhan/20141215 to /mnt/hdd/backup/20141215 – Haifeng Zhang May 13 '15 at 20:13
  • @JohnBollinger If move the file onto itself, it will say something like this: mv: ‘sample.csv’ and ‘./sample.csv’ are the same file – Haifeng Zhang May 13 '15 at 20:15
  • I assume you checked the permissions source directory as well? – Rob May 13 '15 at 20:16
  • I am running the command as root, the source directory permission is drwxr-xr-x. 2 root root 454656 Dec 17 07:04 20141215, based on the error messages, it is kind of writing issue – Haifeng Zhang May 13 '15 at 20:20
0

An "Input/output error" suggests a problem with hardware or filesystem, as indeed proved to be the case here. Upon seeing such an error message it is therefore a good idea to check for more details in the system log, and possibly to run a filesystem integrity check. Such a message does not normally indicate user error.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.