Sponsored Content
Full Discussion: file <filename> fails
Top Forums UNIX for Advanced & Expert Users file <filename> fails Post 302084941 by apoorvasharma80 on Monday 14th of August 2006 08:53:48 AM
Old 08-14-2006
Let's get into something deep, how this file program is working. Every file has got some information of it's type into few starting bytes. Those bytes are known as magic numbers. Your file program will look into this number and try to resolve the file type. You can see the same by using 'od'.
Now as far as your porblem is concern may be there is a file which stores the information about this magic numbers and that file seems to be removed from your system. ( I am not very sure about this, as most of the implemetations of file have this info in the source code).

regards
Apoorva Kumar
 

10 More Discussions You Might Find Interesting

1. Solaris

Created cron.allow file and now email fails

Getting ready for Sarbanes Oxley and I was told that I need to create a cron.allow file for the box so that only specified users can create cron jobs. That was easy enough, and I put in all the accounts that had scheduled cron jobs such as: root lp My oracle account A couple of programmer... (1 Reply)
Discussion started by: citrowske
1 Replies

2. Shell Programming and Scripting

log file when the script fails !

i have a script that will retrive some info from database. The script is working fine but i have to add new feature in it when the script fails or retrive null result it should reflect in the log file. below the script AMR_Inactive.sh while read i do connect1=`sqlplus -silent... (3 Replies)
Discussion started by: ali560045
3 Replies

3. AIX

mkdvd mkcd mksysb from file fails

Hello Folks,Having some problems moving an old mksysb backup to a file image.data to DVD-RAM1) From mkdvd if i do a new backup it works fineBUT2) From mkdvd if I do fails:+--------------------------------------------------------------------------+| Use an existing mksysb image?... (8 Replies)
Discussion started by: filosophizer
8 Replies

4. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

5. Shell Programming and Scripting

echoing complex awk command into file fails

Using hp-ux's shell, I'm trying to echo a complex awk command into a script file for later use. But it fails on a newline character and splits the rest of the command onto the next line. echo ' printf("%s: TOTAL = %18.0lf\n", FILENAME, TOTAL) >> "TOTAL.TXT";' >>awk.script Looks... (3 Replies)
Discussion started by: Scottie1954
3 Replies

6. UNIX for Dummies Questions & Answers

Replacing char in filename scripts fails

Hi I'm trying to remove what I "think" is a bad character. How I got the bad character is when I downloaded jpgs onto my PC and then renamed the files using windows explorer. In cygwin, the files look like $ dir -l total 7840 ----------+ 1 None 3647968 Jul 21 08:41 2012-07-21\ (1).JPG... (6 Replies)
Discussion started by: SailingDreams
6 Replies

7. Shell Programming and Scripting

SFTP Script fails to transmit the file

I have written a Unix Script to automate the process of File transfer from Our server to vendor Server but the automation Script fail when Progress meter is around 65-70% Complete. Why is this haapening? See the Log File Contenet: spawn sftp -o IdentityFile=/home/lawsched/ah_rsa XXX@YYY.com... (10 Replies)
Discussion started by: Mahesh Gajapath
10 Replies

8. Shell Programming and Scripting

Windows exe file fails when triggered from ssh

Hi, I am triggering a windows exe file using the below command. ssh user@remoteserver command.exe -option1:xx /option2:yy This command is working fine from windows command prompt. When I am triggering the same command from ssh I get the error message cant load Any ideas to deal with... (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies

9. Shell Programming and Scripting

Bash script fails when run as file

The following bash script fails with error message: "./phpquery_KNBB_html_reader.sh: line 65: syntax error near unexpected token `done'" when do ./<scriptname> in the shell. However when I copy-paste the entire contents of the file directly into a shell environment it runs ok returning the intended... (2 Replies)
Discussion started by: BurritoSolution
2 Replies

10. UNIX for Beginners Questions & Answers

Extraction of .gz file using 7zip fails

Hi, My target is to send a file created by Unix process to myself as an excel file. So I have used the below commands to achieve it. tr -d '\t' < PROGRAM_CREATED_FILE | sed -e 's/\\//g' | awk 'BEGIN{FS=">"; OFS="\t"} '{$1=$1}1' > file.xls gzip -9 file.xls echo "test mail" | sendxchange -a... (3 Replies)
Discussion started by: PikK45
3 Replies
ioconfig(4)						     Kernel Interfaces Manual						       ioconfig(4)

NAME
ioconfig - ioconfig entry format SYNOPSIS
DESCRIPTION
The file is used to retain information on a system's I/O configuration across reboots. It contains two types of information: o Mappings of dynamically allocated major numbers to drivers. o Mappings of instance numbers to hardware paths. At boot time this file is read and the information is stored in the kernel data structure. The file is created by at install time and is modified by and when devices are added or removed (see insf(1M), rmsf(1M), and ioscan(1M)). The only purpose of the file to maintain con- figuration information when the system is not running. While the system is running, all accesses are made directly to the kernel struc- ture, although any tools that change the kernel structures must also keep consistent. There will be two copies of maintained: and A second copy is placed in because NFS diskless clients are not guaranteed to have a reliable directory at boot time. The file begins with the magic number. Following the magic number is an array of structures, which logically form a tree structure defining the connectivity of the various levels of software modules and managers, the device class and hardware address of each element, and the logical unit associated with each leaf node. The root of the tree is array element 0. Each contains the following fields as defined in The definitions of each element are as follows: Each record must have a character string as its first entry which is used to identify the record type. The default record is the If the string begins with an underscore character then it is one of the variants. This is the default record entry for the ioconfig file. The must begin with an underscore character to distinguish record from other record type. The element is a structure that contains following elements. This record stores information about major numbers dynamically assigned to drivers. It is used to allow major number assignments to persist across boots. The must begin with (underscore) character to distinguish record from other record type. The contains following elements. AUTHOR
was developed by HP. FILES
SEE ALSO insf(1M), ioinit(1M), ioscan(1M), rmsf(1M), magic(4). ioconfig(4)
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy