Home > computers > linux > bash > all files | About

You'll notice that if you use the "*" special character, you won't get the files or folders that start with "."

root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # ls -d /var/vmail/algerian-radio.dz/a.chaouche/*
drwxr-xr-x 2 root  root  4.0K Jun  2 11:35 /var/vmail/algerian-radio.dz/a.chaouche/courierimaphieracl
drwx------ 2 vmail vmail 4.0K May 29 00:08 /var/vmail/algerian-radio.dz/a.chaouche/courierimapkeywords
-rw-r--r-- 1 vmail vmail  217 Jun  7 15:33 /var/vmail/algerian-radio.dz/a.chaouche/courierimapsubscribed
-rw-r--r-- 1 vmail vmail 143K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/courierimapuiddb
drwx------ 2 vmail vmail 228K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/cur
-rw-rw---- 1 vmail vmail   30 Jun  7 10:53 /var/vmail/algerian-radio.dz/a.chaouche/ispconfig_mailsize
-rw-r--r-- 1 vmail vmail 1.9K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/maildirsize
drwx------ 2 vmail vmail  12K Jun  7 10:53 /var/vmail/algerian-radio.dz/a.chaouche/new
drwx------ 2 vmail vmail 4.0K Jun  7 15:38 /var/vmail/algerian-radio.dz/a.chaouche/tmp
root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # 

In the other hand, if you use ".*" you will get only those files that start with "."

root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # ls -d /var/vmail/algerian-radio.dz/a.chaouche/.*
drwx------  16 vmail vmail 4.0K Jun  7 15:33 /var/vmail/algerian-radio.dz/a.chaouche/.
drwx------ 196 vmail vmail  12K May 28 14:33 /var/vmail/algerian-radio.dz/a.chaouche/..
drwx------   6 vmail vmail 4.0K May 10 12:04 /var/vmail/algerian-radio.dz/a.chaouche/.Coupures Streaming
drwx------   6 vmail vmail 4.0K Jun  1 17:18 /var/vmail/algerian-radio.dz/a.chaouche/.Drafts
drwx------   6 vmail vmail 4.0K Jun  1 15:43 /var/vmail/algerian-radio.dz/a.chaouche/.Flux audio
drwx------   6 vmail vmail 4.0K Jun  1 09:42 /var/vmail/algerian-radio.dz/a.chaouche/.Junk
drwx------   6 vmail vmail 4.0K May 29 00:09 /var/vmail/algerian-radio.dz/a.chaouche/.notifs
drwx------   6 vmail vmail 4.0K Jun  2 10:06 /var/vmail/algerian-radio.dz/a.chaouche/.PRTG
drwx------   6 vmail vmail 4.0K Jun  7 12:44 /var/vmail/algerian-radio.dz/a.chaouche/.Sent
drwx------   6 vmail vmail 4.0K Feb  4 13:32 /var/vmail/algerian-radio.dz/a.chaouche/.TEST
drwx------   6 vmail vmail 4.0K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/.Trash
root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # 

So how do you get all the files including those that start with "." ? you use shopt -s dotglob

root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # shopt -s dotglob
root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # ls -d /var/vmail/algerian-radio.dz/a.chaouche/*
drwx------ 6 vmail vmail 4.0K May 10 12:04 /var/vmail/algerian-radio.dz/a.chaouche/.Coupures Streaming
drwxr-xr-x 2 root  root  4.0K Jun  2 11:35 /var/vmail/algerian-radio.dz/a.chaouche/courierimaphieracl
drwx------ 2 vmail vmail 4.0K May 29 00:08 /var/vmail/algerian-radio.dz/a.chaouche/courierimapkeywords
-rw-r--r-- 1 vmail vmail  217 Jun  7 15:33 /var/vmail/algerian-radio.dz/a.chaouche/courierimapsubscribed
-rw-r--r-- 1 vmail vmail 143K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/courierimapuiddb
drwx------ 2 vmail vmail 228K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/cur
drwx------ 6 vmail vmail 4.0K Jun  1 17:18 /var/vmail/algerian-radio.dz/a.chaouche/.Drafts
drwx------ 6 vmail vmail 4.0K Jun  1 15:43 /var/vmail/algerian-radio.dz/a.chaouche/.Flux audio
-rw-rw---- 1 vmail vmail   30 Jun  7 10:53 /var/vmail/algerian-radio.dz/a.chaouche/ispconfig_mailsize
drwx------ 6 vmail vmail 4.0K Jun  1 09:42 /var/vmail/algerian-radio.dz/a.chaouche/.Junk
-rw-r--r-- 1 vmail vmail 1.9K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/maildirsize
drwx------ 2 vmail vmail  12K Jun  7 10:53 /var/vmail/algerian-radio.dz/a.chaouche/new
drwx------ 6 vmail vmail 4.0K May 29 00:09 /var/vmail/algerian-radio.dz/a.chaouche/.notifs
drwx------ 6 vmail vmail 4.0K Jun  2 10:06 /var/vmail/algerian-radio.dz/a.chaouche/.PRTG
drwx------ 6 vmail vmail 4.0K Jun  7 12:44 /var/vmail/algerian-radio.dz/a.chaouche/.Sent
drwx------ 6 vmail vmail 4.0K Feb  4 13:32 /var/vmail/algerian-radio.dz/a.chaouche/.TEST
drwx------ 2 vmail vmail 4.0K Jun  7 15:40 /var/vmail/algerian-radio.dz/a.chaouche/tmp
drwx------ 6 vmail vmail 4.0K Jun  7 14:24 /var/vmail/algerian-radio.dz/a.chaouche/.Trash
root@messagerie-secours[10.10.10.20] /var/vmail/backup.algerian-radio.dz/a.chaouche # 

contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code bashshopt (generated for current page)