Welcome

Troves being gleaned while surfing on the Internet mostly about computer/IT/system skills and tricks, Welcome here ...
Powered By Blogger

Disclaimer

This blog is written by the owner with real practices and tests and intended to hold all original posts except there is a clear declaration for referencing from others. Thanks for tagging with the source link or other tips for reference from here if you would like to quote partial or full text from posts in this blog.

Friday, December 31, 2010

How to copy all including hidden files or directories using linux shell

While copying all stuff under a directory into another place, by

cp  $SRC/*  $DST

will fail to copy all the hidden file (prefixing with ., the dot) in the end.

A foolproof way to achieve this is to go sinuously :

cp $SRC/*  $SRC/.* $DST

there will come up with prompt like :
cp: omitting directory `$SRC/.'
cp: omitting directory `$SRC/..'

just turn back on it. having got thing done.

No comments: