- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- file type
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 12:47 AM
тАО11-28-2003 12:47 AM
file type
file xxxxxxx
I have this type I don't know :
awk program text
I can't open with vi or cat ? ?
I don't know awk language ???
I only want to see this file with an EDITOR ? ? is it a object ?
Thank's . . .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 12:51 AM
тАО11-28-2003 12:51 AM
Re: file type
you MAY open it with a text editor like vi, better if to try first with the command:
strings "filename" | more
Thus you can see if it is really readable or not.
An awk program text is usually a text program, huma readable, but it maybe a mismatch in the pattern recognition routine. So, before editing it, try to visualize it.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 12:53 AM
тАО11-28-2003 12:53 AM
Re: file type
So it would simply mean that 'file' didn't recognize the file type.
Regads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 02:23 AM
тАО11-28-2003 02:23 AM
Re: file type
is everything you wrote, the output of the file command?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 02:59 AM
тАО11-28-2003 02:59 AM
Re: file type
Jean is the story true. As far as I know the initial file was written by Ian F Darwin. Did he say like that :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 03:26 AM
тАО11-28-2003 03:26 AM
Re: file type
Bruno
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2003 06:49 AM
тАО11-28-2003 06:49 AM
Re: file type
So file uses the /etc/magic file to 'guess' what kind of data might be inside. You may have heard the term 'magic number' in Unix...it refers to specific strings or numbers that are always the same for a specific file such as an executable. For example, the file command says about itself:
# file /usr/bin/cut
/usr/bin/file: PA-RISC1.1 shared executable dynamically linked
and grep'ing through the /etc/magic file for PA-RISC1.1, you'll find:
# grep "PA-RISC1.1 shared executable" /etc/magic
0 long 0x02100108 PA-RISC1.1 shared executable
The code says: starting at the first word in the file, if the hex digits are: 02100108 then it is a shared executable for PA-RISC CPUs version 1.1 and higher. To check this out:
# xd /usr/bin/file | head -1
0000000 0210 0108 0512 4000 0000 0000 0000 0000
And sure enough: right after the starting address 0000000 is 0210 0108. Now here's the rub: suppose I create a binary file consisting of a bunch of numbers where the first number is 0x02100108. Then file will say that it is an executable but it would be wrong. Similarly:
# echo '%!PS-Adobe-' > xy
# file xy
xy: postscript file
Clearly xy is not a usable Postscript file but the file command guesses that it is. And as mentioned, awk is just a fall-through result. So before you cat a file, verify the contents with either:
# cat -v /somefile | more
# xd -xc /somefile
Note that vi is fairly friendly in that it recognizes binary exectuables (regardless of whether they have the execute bit set) and will handle binary characters without messing up your screen.
Bill Hassell, sysadmin