Re: command to copy hidden files?

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

 



Dave Stevens wrote:
> I've tried to copy files from my home folder to do a disk upgrade. I
> foolishly only copied the visible (non-dot) files. Now I'd like to copy
> only the . files (recursively) but don't see what the syntax is. Anyone?

Back in 2004, Ulrich Drepper (the maintainer of glibc) wrote on this
list:
> The most straight-forward way is to tell the shell you want the dot
> files:
>
> $ ls -a
> ./  ../  .uu
> $ echo *
> *
> $ shopt -s dotglob
> $ echo *
> .uu
> $ shopt -u dotglob
> $ echo *
> *

In other words, use shopt -s dotglob and leading dots stop being
special.

Hope this helps,

James.

-- 
E-mail:     james@ | WARNING:  Pressing CTRL+ALT+DEL again will restart your
aprilcottage.co.uk | computer.  Then again, what won't?  You will lose unsaved
                   | information, and even supposedly saved information, in
                   | any case.                              -- David P. Murphy


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux