LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   an important issue in find command any help pleas :) (https://www.linuxquestions.org/questions/linux-newbie-8/an-important-issue-in-find-command-any-help-pleas-808671/)

bhb 05-18-2010 02:21 PM

an important issue in find command any help pleas :)
 
hiii

i need help in this issue

how to find files with unusual size
and with
unusual names of
EX :
just dots, names ending with space(s),
names containing shell wildcard characters, names containing non-ASCII (control) characters

can any one help me pleas :)

acid_kewpie 05-18-2010 02:22 PM

wtf is an unusual size?? you find them by looking for things which match your pattern, e.g. "find / -regex ' $'" should match anything ending in a space.

MTK358 05-18-2010 02:56 PM

This will match a filename consisting of 5 dots followed by a space and a tab:

Code:

$'..... \t
Placing a '$' before a single-quoted string enables C-style escape sequences.

chrism01 05-18-2010 06:36 PM

In order to ensure I didn't miss any files, I'd do it in Perl using opendir,readdir,closedir fns http://perldoc.perl.org/functions/readdir.html.
Perl's built-in regex engine is very powerful, so you could use that to check for patterns http://perldoc.perl.org/perlrequick.html http://perldoc.perl.org/perlretut.html


All times are GMT -5. The time now is 09:27 AM.