Sponsored Content
The Lounge What is on Your Mind? Whack the penguin - oooold version Post 302388476 by Loic Domaigne on Wednesday 20th of January 2010 03:00:15 PM
Old 01-20-2010
319.3 so far...

Guess, we'll run into troubles with the PETA... Smilie
 

8 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Linux-loving McNealy dons penguin outfit

Linux-loving McNealy dons penguin outfit (0 Replies)
Discussion started by: Neo
0 Replies

2. News, Links, Events and Announcements

Goldman Sachs: Fear the Penguin

http://news.yahoo.com/news?tmpl=story2&ncid=&e=5&u=/nf/20030115/tc_nf/20471 (0 Replies)
Discussion started by: Neo
0 Replies

3. UNIX for Dummies Questions & Answers

version of OS

Hi , what is the command to find the version of OS running on a unix box? Thanks. (4 Replies)
Discussion started by: tselvanin
4 Replies

4. UNIX for Dummies Questions & Answers

VERSIOn

Hi, I would like to know, how do I findout what version UNIx OS my computer is using? Is there a particular command I type to do this? Please advise. Thanks (1 Reply)
Discussion started by: huhuloa
1 Replies

5. Solaris

Migrate unix version 8 to version 9

i have a program writing in PRO C which currently running in unix version 8 tie with oracle 8i, but in the future company gonna migrate this OS to version 9. Anything i have to prepare for my PRO C program to run in unix version 9? or anything would that impact my program couldn't run well? what... (2 Replies)
Discussion started by: lsy
2 Replies

6. UNIX for Advanced & Expert Users

Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version

Would like to confirm the ff. I got confused actually with the version I needed to download that will work on glassfish 3.0.1 a. Debian Squeeze (HP DL360). Need to use java version6 On Debian, I did apt-get install sun-java6-jdk. So when I check it's java version "1.6.0_22" Java(TM) SE... (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

8. Red Hat

OS version and Firmware version

Guys, How to find OS version and firmware version in LINUX? Like in AIX. uname -a will show me the version 5.3, 6.1,7.1. lsmcode -c will show me - system firmware image as SF240_417. What are the similar commands in Linux. I checked uname -a and cat /etc/release. uname... (1 Reply)
Discussion started by: ElizabethPJ
1 Replies
File::MMagic::XS(3pm)					User Contributed Perl Documentation				     File::MMagic::XS(3pm)

NAME
File::MMagic::XS - Guess File Type With XS (a la mod_mime_magic) SYNOPSIS
use File::MMagic::XS; my $m = File::MMagic::XS->new(); $m = File::MMagic::XS->new('/etc/magic'); # use external magic file my $mime = $m->get_mime($file); # use File::MMagic compatible interface use File::MMagic::XS qw(:compat); my $m = File::MMagic::XS->new(); $m->checktype_filename($file); DESCRIPTION
This is a port of Apache2 mod_mime_magic.c in Perl, written in XS with the aim of being efficient and fast, especially for applications that need to be run for an extended amount of time. There is a compatibility layer for File::MMagic. you can specify :compat when importing the module use File::MMagic::XS qw(:compat); And then the following methods are going to be available from File::MMagic::XS: checktype_filename checktype_filehandle checktype_contents addMagicEntry Currently this software is in beta. If you have suggestions/recommendations about the interface or anything else, now is your chance to send them! METHODS
new(%args) Creates a new File::MMagic::XS object. If you specify the "file" argument, then File::MMagic::XS will load magic definitions from the specified file. If unspecified, it will use the magic file that will be installed under File/MMagic/ directory. clone() Clones an existing File::MMagic::XS object. parse_magic_file($file) Read and parse a magic file, as used by Apache2. get_mime($file) Inspects the file specified by $file and returns a MIME type if possible. If no matching MIME type is found, then undef is returned. fsmagic($file) Inspects a file and returns a MIME type using inode information only. The contents of the file is not inspected. fhmagic($fh) Inspects a file handle and returns a mime string by reading the contents of the file handle. ascmagic($file) Inspects a piece of data (assuming it's not binary data), and attempts to determine the file type. bufmagic($scalar) Inspects a scalar buffer, and attempts to determine the file type add_magic($magic_line) Adds a new magic entry to the object. The format of $magic_line is the same as magic(5) file. This allows you to add custom magic entries at run time add_file_ext($ext, $mime) Adds a new file extension to MIME mapping. This is used as a fallback method to determining MIME types. my $magic = File::MMagic::XS->new; $magic->add_file_ext('t', 'text/perl-test'); my $mime = $magic->get_mime('t/01-sanity.t'); This will make get_mime() return 'text/perl-test'. error() Returns the last error string. PERFORMANCE
This is on my laptop (MacBook, Core 2 Duo/ Mac OS X 10.4.3), tested against File::MMagic::XS 0.09003 Rate perl xs perl 513/s -- -96% xs 12048/s 2249% -- SEE ALSO
File::MMagic AUTHOR
Copyright 2005-2007 Daisuke Maki <daisuke@endeworks.jp>. Underlying software: Copyright 1999-2004 The Apache Software Foundation, Copyright (c) 1996-1997 Cisco Systems, Inc., Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2010-05-18 File::MMagic::XS(3pm)
All times are GMT -4. The time now is 11:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy