If you have the .pm file for mime type checking (for example like Lite.pm for mime::lite)
you do not necessarily have to "install" the module. Just put it in your directory on the machine you are using, say /home/Rhije/Lite.pm
and add this to the shebang in the top of your own perl code
This may not always work, but mime content-type checking is reasonably complex, so it is definitely worth a try. Rather than rolling your own. You can pack the two files in a tarball, extract them and run the perl. I know it violates your "one file" request.
I have a problem while sending attachement , it is displying Content into body of mail (Junk Data) instead of attachment (zip format) in Linux, same code is working in Sun Solaris..
I have read query in this site , need to set MIME type to mailx componment. Please help me how to set MIME type..... (1 Reply)
Using Lynx, when I try to download a .rar, it confirms I want to download and its got it as an appication/rar file.
However, split archives that end in .r## (.r00, .r01 ...) are not recognized as an appication/rar file and it reads the file like a .txt or .html.
How can I fix this?
Thanks! (2 Replies)
Hello
I need to retrieve the content of a file in the shell script file(.sh file).
I store the Process ID of the a process in file.Only the PID is available in that file.
Inside the shell script i want to retireve the content(PID) and need to check for the existence of the Process.Basically... (5 Replies)
Hello.
I need to send mails from hp-ux with 2 attachments: a text file and an excel file. So I'm composing a mime file which I will pipe to sendmail utility.
This works fine if the only attachment is the text file (i use cat command to attach text content). But I have problems with the format... (3 Replies)
Hi All..
I have a Filename as
FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis
I want to get the result as... (5 Replies)
I've spent a good two weeks on trying to figure out a proper way to get the mime type of a file. The "file" command on the Sparc machine I'm working on is an older version and does not support the --mime flag. It outputs things like:
somefile.pdf: Adobe Portable Document Format (PDF) v1.5
... (3 Replies)
Hello,
I am trying to send a gzip file on email using below command but the zipped file received on email is corrupt.
mailsend -smtp $smtpip -content-type 'application/x-gzip' -mime-type "application/x-gzip" -t $receiver -f $sender -sub "$subject" -M "$MSG" -attach $file
file name is ... (1 Reply)
Discussion started by: tushar.modgil
1 Replies
LEARN ABOUT SUNOS
update-mime-database
update-mime-database(1) User Commands update-mime-database(1)NAME
update-mime-database - build the shared MIME_Info database cache
SYNOPSIS
update-mime-database -h | -v | mime-dir
DESCRIPTION
update-mime-database updates the shared mime-info cache according to the system described in the Shared MIME-Info Database specification
from the X Desktop Group.
OPTIONS
The following options are supported:
-h Display a command summary.
-v Display version information
OPERANDS
The following operands are supported:
MIME-dir The directory for which update-mime-database should rebuild the cache. This option is mandatory if no other option is pro-
vided.
EXAMPLES
Example 1: Update Shared mime-info Cache for /usr/share
example% update-mime-database /usr/share
ENVIRONMENT VARIABLES
See environ(5).
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
>0 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/update-mime-datExecutable to build the shared MIME_Info database cache
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-vfs |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform.
gnome-vfs-mime-magic(4), gnome-vfs.applications(4), gnome-vfs.keys(4), gnome-vfs.mime(4)
Shared mime info at http://www.freedesktop.org.
NOTES
Original man page written by Filip Von Raemdonck (mechanix@debian.org).
Updated by Matt Keenan, Sun Microsystems Inc., 2004.
SunOS 5.10 6 Sep 2004 update-mime-database(1)