Main Menu

friends

Banner

Latest articles

Hello World in java
18/11/2009 | mad mad mod

This article describes how to write, compile and execute a "Hello World" program in java on Linux (Fedora).  1. the prerequisitesa text editor of your choice (e.g. vi)a java compiler (go to http: [ ... ]


Supertux - a very nice 2D jump and run game on Linux
17/10/2009 | mad mad mod

Supertux is an open source remake of the very popular 2D side-scroller game Super Mario from Nintendo. Name: Supertux Homepage: http://supertux.lethargik.orgDownload: http://supe [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
how to copy hidden files from one directory to another E-mail
sysadmin

Let's assume that you have a directory "test" containing the following files:

 

 

[root@blackmod test]# ls -la
total 8
drwxr-xr-x.  2 root root 4096 2010-03-10 06:11 .
dr-xr-x---. 11 root root 4096 2010-03-10 06:13 ..
-rw-r--r--.  1 root root    0 2010-03-10 06:11 file1
-rw-r--r--.  1 root root    0 2010-03-10 06:11 file2
-rw-r--r--.  1 root root    0 2010-03-10 06:11 .hidden

 

If you want to copy all 3 files to /tmp/ you have to use 2 commands:

 

1 to copy all visible files:

 

[root@blackmod test]# cp -v /root/test/* /tmp/
`/root/test/file1' -> `/tmp/file1'
`/root/test/file2' -> `/tmp/file2'

 

and a second command to copy all hidden files (files which start with a '.'):

 

 

[root@blackmod test]# cp -v /root/test/.* /tmp/
cp: omitting directory `/root/test/.'
cp: omitting directory `/root/test/..'
`/root/test/.hidden' -> `/tmp/.hidden'

 

 

A much easier way to do that is to set the "dotglob" shell option:

[root@blackmod test]# shopt -s dotglob

{chilicode}

 

--> If  set, bash includes filenames beginning with a ‘.’ in the results of pathname expansion.

{chilicode}

[root@blackmod test]# cp -v /root/test/* /tmp/
`/root/test/file1' -> `/tmp/file1'
`/root/test/file2' -> `/tmp/file2'
`/root/test/.hidden' -> `/tmp/.hidden'

 

 

 

 

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting