Crazy directory thing

Robin Laing Robin.Laing at drdc-rddc.gc.ca
Wed Jun 8 14:14:12 UTC 2005


Andy Pieters wrote:
> 
------------------------------------------------------------------------
> 
> Hi all
> 
> I have been noticing some strange behaviour and was hoping someone here is 
> more experienced to know what is going on.
> 
> Directory structure
> 
> +home
> +--ogg
> | +-- incomming
> \--incomming
> 
> So I do 
> 
> cd ~/incomming
> mv *.mp3 ../ogg/incomming
> Result: mv: when moving multiple files, last argument must be a directory
> cp *.mp3 ../ogg/incomming
> Result: cp: `../ogg/incomming': specified destination directory does not exist
> file ../ogg/incomming
> ../ogg/incomming: ERROR: cannot open `../ogg/incomming' (No such file or 
> directory)
> 
> WTF?
> 
> cd ../ogg/incomming
> file .
> .: directory
> mv ../../incomming/*.mp3 .
> Result: ok
> 
> Weird isn't it?
> 
> Andy
> 

Andy, it sounds like an issue with symlinks.  I have come across this 
before.  is the ~/incomming directory a symlink?  I ask this as I have 
run into this issue when working from symlink directories.

I just did a quick test.


mkdir TEST
cd TEST
mkdir test2
ln -s ../dir1/dir2
cd dir2 (the symlink)
cp somefile ../test2
cd ..
ls test 2
    {No files found.}

cd ../dir1/
ls -l test2
    {returned the copied file.}

Is this normal operation or is this a bug?


-- 
Robin Laing




More information about the fedora-list mailing list