Hi All,

I have no idea how else to put the subject. It's weird behaviour.

I'm trying to move a bunch of PDFs which has the words "gentoo" in it
into a folder marked as "Gentoo/" and somehow I'm not succedding.
(I'm too stubborn to want to do it the cut and paste way in nautilus"

$find . -iname gentoo -print
./Gentoo

$find . -iname *gentoo* -print
./Email Servers/Setting up Mail under Gentoo.pdf
./Gentoo
./Gentoo/gentoolkit.pdf
./Gentoo Linux rsync Mirrors Policy.pdf
./Cyrus Imapd-Gentoo.pdf
./openMosix Cluster on Gentoo.pdf
./Gentoo chroot.pdf

Note : I want to move "gentoo chroot" "openmosix" into the Gentoo/
folder

$ls --quoting-style=shell-always | grep -i gentoo.*pdf >pop && mv `cat
pop` Gentoo/
mv: cannot stat `\'Cyrus': No such file or directory
mv: cannot stat `Imapd-Gentoo.pdf\'': No such file or directory
mv: cannot stat `\'Gentoo': No such file or directory

$cat pop
'Cyrus Imapd-Gentoo.pdf'
'Gentoo Linux rsync Mirrors Policy.pdf'
'Gentoo chroot.pdf'

Why Can't I move them into the Gentoo Folder??  based on the output of
"cat pop" it seems like they are formatted properly. (newlines etc)


I also tried 
$for i in `ls --quoting-style=shell | grep -i gentoo.*pdf`; do (echo
"$i"; cp "$i" /tmp/popo); done
'Cyrus
cp: cannot stat `\'Cyrus': No such file or directory
Imapd-Gentoo.pdf'
cp: cannot stat `Imapd-Gentoo.pdf\'': No such file or directory


Question :
1. How can this made to work?? 
2. Using find, is there any way to only restrict it to the current
directory and not dive into any directories under the current one?
(tried maxdepth but seems like it doesn't work. It'll list down _all_
the files in that directory)

$find . -maxdepth 1 -type f -print -name *gentoo*
./fluxbook.pdf
./AWLP-Wireless AP Project-Installation.pdf
./HOWTO Fluxbox.pdf

3. note that my current user is named "gentoo"
gentoo users     Building Scalable ISPs with open-source softwares.pdf
gentoo users     Squirrelmail-SpeedWithUW-IMAP.pdf




-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 
98% Microsoft(tm) Free!! 
Neuromancer 17:36:26 up 8:23, 7 users, 
load average: 0.65, 1.15, 0.95 


--
[email protected] mailing list

Reply via email to