Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xfmtype(1) [debian man page]

XFMTYPE(1)								XFM								XFMTYPE(1)

NAME
xfmtype - xfm file type tester SYNOPSIS
xfmtype -m magic_file [-f] filename ... DESCRIPTION
The xfmtype program reads a magic configuration file and tests each file in its command line to tell its type according to the configura- tion file. The format of the configuration file is the similar to magic(5) with the differences described in 0 OPTIONS
-f file Consider the following argument as a file, even if it begins with `-'. -m file Specifies a configuration file. You can specify more than one configuration file with several -m flags. They are read in the order in which they are found. Configuration files do not have effect until they are encountered in the command line. So, files to test in the command line before that switch will not be affected by it. BUILT IN TYPES
If no rule matches a specified field or the type cannot be determined because of other reasons, one of the following built in types is returned: inode/x-unreadable The file could not be read. inode/x-empty File size is zero. text/plain The file looks like ACSII. xfm will look into xfm_mime.type(5) for more guessing. application/octet-stream Other regular file. xfm will look into xfm_mime.type(5) for more guessing. inode/directory A directory. inode/chardevice A character device. inode/blockdevice A block device. inode/pipe A names pipe (fifo). inode/socket A socket. inode/default None of the above. BUGS
Bad configuration lines cause undefined behavior. In general they are silently ignored, but that is not guaranteed. There are no warning or error message except for the regular expression syntax. There should be a syntax checking mode. All of the above apply to xfm too. SEE ALSO
xfm(1), xfm_magic(5), file(1), magic(5). COPYRIGHT
Copyright (c) 1995 CNM-US Copyright (c) 1995 Juan D. Martin AUTHOR
Juan D. Martin (juando@cnm.us.es) (but modified heavily by Bernhard R. Link) xfm 20 April, 2006 XFMTYPE(1)

Check Out this Related Man Page

XFM_MIME.TYPES(5)							XFM							 XFM_MIME.TYPES(5)

NAME
xfm_mime.types - suffix based fall back mime type information DESCRIPTION
When xfm(1) cannot determine the type of a file using the values in xfm_magic(5), this file is used to guess a type of a file. The file shipped with xfm by default just tells to include the files ~/.mime.types and /etc/mime.types to get the system wide settings. FORMAT
There is one entry per line. Empty lines and lines starting with a hash (#) are ignored. Prior entries overwrite later ones. If a line starts with !include or include the rest of the line is treated as a filename to process before continuing with the rest of the file. (If the filename starts with a tilde followed by a slash, the tilde is replaced by the content of the HOME environment variable.) Other lines contain the name of a mime type followed by an arbitrary number of filename suffixes, separated by spaces or tabs. A file that got no other type associated by content and whose name ends with a dot followed by the specified suffix, will be treated as type mime type. Xfm only recognizes suffixes with at most 7 characters. EXAMPLES
Otherwise unidentified files anding in .c are treated as text/x-csrc: text/x-csrc c Same with .c++, cpp, cxx or cc as text/x-c++src: text/x-c++src c++ cpp cxx cc FILES
$HOME/.xfm/xfm_mime.types Unless xfm(1) is told to look at a different place via X resource Xfm.mimeTypesFile, this is the first place xfm looks for a file with the describes format. /etc/X11/xfm/xfm_mime.types If the first file does not exists, xfm(1) (unless it gets told a different place via the X resource Xfm.systemwideMimeTypesFile) looks for this file. $HOME/.mime.types General user settings normaly included from /etc/X11/xfm/xfm_mime.types /etc/mime.types General system wide settings normaly included from /etc/X11/xfm/xfm_mime.types SEE ALSO
xfm(1) xfm 20 April, 2006 XFM_MIME.TYPES(5)
Man Page