Can some one there help me with Terminal

Brian McKee brian.mckee at gmail.com
Thu Jul 9 01:37:28 UTC 2009


On Wed, Jul 8, 2009 at 7:31 PM, alfred<alfred.s at nexicom.net> wrote:
> I'd like to open each of these directories in turn, and then copy each
> Deb Package to a folder I'm calling disk1-main1 which is on my desktop.

Hi Alfred

I'm not going to talk about the rest of what you are doing, except to
say I think there are tools to accomplish what you want, rather than
hand massaging all this.
I think apt-cdrom might be the right tool - but I haven't used it.

That said, to accomplish your 'harvesting' task, you should use the
'find' command with it's '-exec' option.

So,
  find /media/cdrom0 -iname *.deb -ls
will show you a list of all the .deb files on your cdrom, regardless
of the folder they are in.
  find /media/cdrom0 -iname *.deb -exec cp "{}"
/home/alfred/desktop/disk1-main1/ \;
will copy each of those debs to that folder on your desktop.
The {} will be replaced by each .deb file name as it finds them.  It's
in quotes to make sure spaces don't muck us up.  And there's a \; at
the end to help the exec command know where to stop.
man find for more details.  It's very useful, but somewhat cryptic.

Brian



-- 
All you need to know about Ubuntu 9.04 Jaunty -> gconftool -s --type
bool /apps/update-notifier/auto_launch false




More information about the ubuntu-ca mailing list