FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 10-05-2011, 12:45 AM
Jordan Metzmeier
 
Default OT: Compatibility Issues With Windows Files

On Tue, Oct 4, 2011 at 4:48 PM, Ralf Mardorf <ralf.mardorf@alice-dsl.net> wrote:
> Beside the space issue, you also might take care about globbing.
> If you e.g. "cp *" you won't copy hidden files of the directory, but all
> inside folders of the directory. If you e.g. "rm *", you'll delete all
> files, including hidden files.

The command "cp *" will not recurse into directories without -r or -a
to enable recursion. The "*" is expanded by the shell and is passed as
arguments to the command. This means that "*" will expand to the same
set of files and directories, regardless of the command in front of
it. In bash, you can enable globbing of hidden files with "shopt -s
dotglob".

dotglob If set, bash includes filenames beginning with a `.' in
the results of pathname expansion.

Regards,
--
Jordan Metzmeier


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAD758RgGmOqcRC48iBfgUN7RzjwKhep=MDTe6mO97ptTVuM0a Q@mail.gmail.com">http://lists.debian.org/CAD758RgGmOqcRC48iBfgUN7RzjwKhep=MDTe6mO97ptTVuM0a Q@mail.gmail.com
 
Old 10-05-2011, 07:32 AM
Ralf Mardorf
 
Default OT: Compatibility Issues With Windows Files

On Tue, 2011-10-04 at 19:45 -0500, Jordan Metzmeier wrote:
> On Tue, Oct 4, 2011 at 4:48 PM, Ralf Mardorf <ralf.mardorf@alice-dsl.net> wrote:
> > Beside the space issue, you also might take care about globbing.
> > If you e.g. "cp *" you won't copy hidden files of the directory, but all
> > inside folders of the directory. If you e.g. "rm *", you'll delete all
> > files, including hidden files.
>
> The command "cp *" will not recurse into directories without -r or -a
> to enable recursion. The "*" is expanded by the shell and is passed as
> arguments to the command. This means that "*" will expand to the same
> set of files and directories, regardless of the command in front of
> it.

*lol* sorry, I should have add the -r switch.

> In bash, you can enable globbing of hidden files with "shopt -s
> dotglob".
> dotglob If set, bash includes filenames beginning with a `.' in
> the results of pathname expansion.

I didn't know that .

Anyway, I just thought it might be an important hint, for somebody who
has got issues with spaces.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1317799964.2577.16.camel@debian">http://lists.debian.org/1317799964.2577.16.camel@debian
 

Thread Tools




All times are GMT. The time now is 04:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org