micxz |
07-10-2009 07:18 PM |
Finding files that start with a period?
Seems like this should be easy but for some reason I'm having trouble finding only files that start with a period "." here's clip from my history.
Code:
1118 find /var/www/vhosts/ -type f -print -name "\.*"
1119 find /var/www/vhosts/ -type f -print -iname ^.*
1121 find /var/www/vhosts/ -type f -print -name .*
1122 find /var/www/vhosts/ -type f -print -name .\*
1123 find /var/www/vhosts/ -type f -print | grep .[^\.]*
1125 find /var/www/vhosts/ -type f -print -name .[^\.]*
1126 find /var/www/vhosts/ -type f -print -name [^\.]*
1127 find /var/www/vhosts/[^\.]* -type f -print
1128 find /var/www/vhosts/ -name [^\.]* -type f -print
1129 find /var/www/vhosts/ -type f -print
1131 find /var/www/vhosts/ -type f -print \( -regex ".*/\..*" \)
1132 find /var/www/vhosts/ -type f -print -regex ".*/\..*"
1133 find /var/www/vhosts/ -type f -print -regex "^.*/\..*"
1134 find /var/www/vhosts/ -type f -print -regex "^.*"
1135 find /var/www/vhosts/ -type f -regex "^.*"
1137 find /var/www/vhosts/ -type f -print | egrep "^."
1138 find /var/www/vhosts/ -type f -print | egrep "^\."
1139 find /var/www/vhosts/ -type f -print | egrep "^\.*"
1141 find /var/www/vhosts/ -type f -print | egrep ^\.
1142 find /var/www/vhosts/ -type f -print | egrep ^.*
1143 find /var/www/vhosts/ -type f -print | grep .*
1145 find /var/www/vhosts/ -type f -print | grep \.*
1146 find /var/www/vhosts/ -type f -print | grep .[^\.]*
There is probably a very very simple solution and I'm just not thinking right this evening. All of the above either have no output or print all files.
|