[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Crazy directory thing

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

| +-- 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)


cd ../ogg/incomming
file .
.: directory
mv ../../incomming/*.mp3 .
Result: ok

Weird isn't it?


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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]