05-26-2011
What does 'file' say? Usually you know by context, as a UNIX file has no magic but the content, which does not have to self-label.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
After upgrading the OS from Fedora4 to Fedora6, the firefox
view>character encoding doesn't work anymore. None of the foreign
characters can be displayed, no matter what character encoding to
select.
Any suggestions?
Thanks,
bsky
:confused (1 Reply)
Discussion started by: bsky
1 Replies
2. Shell Programming and Scripting
I have a very large file in Unix that I would like to search for all instances of the unicode character 0x17. I need to remove these characters because the character is causing my SAX Parser to throw an exception. Does anyone know how to find a unicode character in a file?
Thank you for your... (1 Reply)
Discussion started by: azelinsk
1 Replies
3. AIX
I am trying to send a vacation message (.vacation.msg) from my AIX 5.3 server. Message is UTF-8 characters. Some email clients (like apple mail) have no problems displaying the correct text, however, some, like Windows Outlook, display garbage.
Is there a way of forcing the client to use proper... (0 Replies)
Discussion started by: lanny
0 Replies
4. UNIX for Dummies Questions & Answers
Hi!
I've got a shell account on a FreeBSD machine. It doesn't have 'vim' installed, but only the original 'vi' text editor ("Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.")
So, in PuTTY I've chosen "UTF-8 translation" to have my non-english characters appear correctly.... (2 Replies)
Discussion started by: Gew
2 Replies
5. Shell Programming and Scripting
Hi,
I am beginner to Unix.
My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8.
Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies
6. Shell Programming and Scripting
hey,
I am trying to convert a sample russian encoding file to English encoding using iconv utility.
Its almost done but with each converted character i am getting one extra character which must not come.
my sample Russian text is
test.txt
А Б В Г Д Е Ж З И Й К ~
and script which i... (4 Replies)
Discussion started by: peeyushgehlot
4 Replies
7. Shell Programming and Scripting
how to find character positionin file?
i.e
string = "123X568"
i want to find the position of character "X".
Thanks (6 Replies)
Discussion started by: LiorAmitai
6 Replies
8. Solaris
Hello all,
I am connecting to ILOM using ssh client (putty) but when RedHat start booting everything look chinese for me...
Probably i have to configure the character set, i tried also utf-8 but the issue remain.
Any idea?
Thanks in advance (0 Replies)
Discussion started by: @dagio
0 Replies
9. Shell Programming and Scripting
Hi Experts,
Is there a way to find a string in a file then append a character to that string then save the file or save to another file.
Here is an example.
>cat test.txt
NULL
NULL
NULL
9,800.00
NULL
1,234,567.01
I want to find all NON NULL String and add a dollar sign to those... (9 Replies)
Discussion started by: brichigo
9 Replies
10. Solaris
Hi all!!
I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII
Is there command to display the files encoding?
Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies
file(1) General Commands Manual file(1)
NAME
file - determine file type
SYNOPSIS
mfile] ffile] file ...
UNIX 2003 (onwards) Synopsis
mfile] Mfile] ffile] file ...
DESCRIPTION
performs a series of tests on each file in an attempt to classify it. If file appears to be an ASCII file, examines the first 512 bytes
and tries to guess its language. If file is an executable file, prints the version stamp, provided it is greater than 0 (see the descrip-
tion of the option in ld(1)).
uses the file to identify files that have some sort of that is, any file containing a numeric or string constant that indicates its type.
Commentary at the beginning of explains the format.
Options
recognizes the following command-line options:
Use alternate magic file
mfile.
(UNIX 2003 onwards Only)
Use alternate magic file Mfile. Do not apply default context-sensitive tests.
Check the magic file for format errors.
This validation is not normally carried out for reasons of efficiency. No file classification is done when this option
is specified.
(UNIX 2003 onwards Only)
Apply position-sensitive tests from the default magic file, and default context-sensitive tests to the file.
Obtain the list of files to be examined from file
ffile. classifies each file whose name appears in ffile.
Do not follow symbolic links.
From UNIX 2003 (onwards) environment, if is not specified and the is a symbolic link referring to a non-existent file, it
is identified as a symbolic link, as if has been specified.
Do not attempt to classify a regular file further.
If the option is specified with the option, option, or both, the concatenation of the position-sensitive tests specified by these
options is applied in the order specified by the appearance of these options.
EXTERNAL INFLUENCES
For information about the UNIX standard environment, see standards(5).
Environment Variables
determines the language in which messages are displayed.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported. However, all non-ASCII text files are identified as "data".
WARNINGS
The command for a release interprets the core files for that particular release correctly. Using the command on a core file generated on a
different release will report incorrect results.
SEE ALSO
ld(1), standards(5).
STANDARDS CONFORMANCE
file(1)