LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2010, 03:21 PM   #1
bhb
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
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
 
Old 05-18-2010, 03:22 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.

Last edited by acid_kewpie; 05-18-2010 at 03:24 PM.
 
Old 05-18-2010, 03:56 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
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.
 
Old 05-18-2010, 07:36 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 06:55 PM
Postfix issue ; Must issue a STARTTLS command first after forcing TLS sarajevo Linux - Server 3 05-14-2009 09:28 AM
Single find command to find multiple files? thok Linux - Newbie 7 01-31-2009 05:45 PM
LXer: GNOME's Stormy Peters on the Most Important Desktop Issue LXer Syndicated Linux News 0 11-17-2008 05:00 PM
!very Important Hardware Issue! Dimitri Linux - Hardware 1 01-29-2004 01:45 AM


All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration