Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Traverse a directory

by singho (Novice)
on Sep 05, 2012 at 12:40 UTC ( [id://991825]=note: print w/replies, xml ) Need Help??


in reply to Re: Traverse a directory
in thread Traverse a directory

Thanks for your input.

Well, i was looking for something similar to which gives me output like file command on unix. stat, won't solve my problem.

my issue is more of finding core files which are owned by root, but also if generated by certain application it should be moved to different areas depending on which program has generated it.

Replies are listed 'Best First'.
Re^3: Traverse a directory
by Corion (Patriarch) on Sep 05, 2012 at 12:59 UTC

    Ah - if you want to determine the "file type" (which is always guesswork), there is MMagic and File::MimeInfo.

    Update: Looking at File::MMagic, it doesn't seem to have a magic number for recognizing core dump files. A likely faster way would be to determine the magic number(s) for core dump files on your system (maybe from the file magic file, maybe under /etc somewhere) and then write Perl code that reads just enough data to just (reliably) detect those core dump files.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://991825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found