Pádraig Brady wrote: > francky.l...@telenet.be wrote: > > I have a PC wich runs under Windows 7. > > On top of that I have a Virtual Box which runs Windows Xp > > and Ubuntu 11.04. > > > > Under Ubuntu I have a problem with the mv command. > > Whenever I execute it, it doesn't work, the machine hangs, > > and I have to terminate it with ctrl-c. Als alternative, > > I use a cp and a rm. > > > > Why is this?
The 'mv' command is executed many, many times by normal system processes such as duiring /etc/init.d/* scripts. It is very unlikely that 'mv' by itself is simply broken. It would much more likely be another combination of things. > >>> We don't have enough to go on there. > >>> Would it be possible to install strace on the ubuntu guest, > >>> and get some output from running the mv command? > >>> > >>> Note none of the machine, host or guest seem to > >>> have hung if you can Ctrl-C > >> > >> ubuntu@ubuntu-VirtualBox:~/.gvfs/account on stockholm$ strace mv > >> source.pdf target.pdf > >> execve("/home/ubuntu/.gvfs/account on stockholm/Documents/03 > >> professional/structured_documentation/unix_routines/bin/mv", ["mv", > >> "source.pdf", "target.pdf"], [/* 41 vars */]) = -1 ENOEXEC (Exec format > >> error) This appears to be under the Ubuntu virtual guest under VirtualBox, running a command that was mounted by gvfs, that actually lives on the underlying MS Windows 7 host system. Whew! That is a lot of layers! And it appears to have failed to run at all giving an "Exec format error". It didn't run. It doesn't seem like this can be the same case that you were originally reporting, a hang, because the above shows an immediate failure. Also the above is not the Ubuntu installed 'mv' command which is installed as /bin/mv on the filesystem. It is another 'mv' command found down inside of a gvfs virtual filesystem layer. That's surprising! Also seeing gvfs associated with this problem would almost certainly be due to gvfs being associated with this problem. It creates a virtual filesystem layer using fuse for userland mounting of another filesystem such as for ssh, ftp, and other file transfer protocols that are not Unix filesystem protocols. That introduces a lot of adaption code and introduces a lot of "rounding errors". You can't really expect it to work for more things than just simple reading and writing of file data. If it does work for more than that then it is truly amazing and something to admire in an awestruck wonder. > Sorry I thought I had replied. > So this the following is the binary being run? > > ~ubuntu/.gvfs/account on stockholm/Documents/03 > professional/structured_documentation/unix_routines/bin/mv > > Is that in your $PATH? What is that binary? > What's the output from mv --verison. > Do things work better when you use /bin/mv explicitly rather than just mv ? I think you have it diagnosed. PATH must be set to directories that are finding "other" versions of 'mv' down in path and in the above located over a gvfs filesystem. Bob