Identify type of file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Identify type of file
# 1  
Old 11-17-2005
Identify type of file

hi all,

i have the next question:
how can i identify the type of a file? . I'm working in Unix (Solaris 5.7) and i would like identify if a file is or not is a "flat file". I need have a program what separates the flat file in a directory, and the excel file in another directory.
I must get the type by its content, not using the name of the file, because is the same format for flat and excel file.

is that possible¿?
please any idea
thanks
# 2  
Old 11-17-2005
are you looking for file command?

$ file aa
aa: ascii text
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Identify missing file

I am on linux and I am supposed to receive 3 files. If any of the files are not received I need to identify the missing file and throw it out in a variable. I have put in something like this if ] then echo "file $file1 was found" else echo "ERROR: file $file1 was not found!!!"... (8 Replies)
Discussion started by: dsravanam
8 Replies

2. Shell Programming and Scripting

Compare large file and identify difference in separate file

I have a very large system generated file containing around 500K rows size 100MB like following HOME|ALICE STREET|3||NEW LISTING HOME|NEWPORT STREET|1||NEW LISTING HOME|KING STREET|5||NEW LISTING HOME|WINSOME AVENUE|4||MODIFICATION CAR|TOYOTA|4||NEW LISTING CAR|FORD|4||NEW... (9 Replies)
Discussion started by: jubaier
9 Replies

3. Solaris

identify server type from ufsdump

Hi guys I have a little problem. I need to identify the server type from some ufsdumps. How can i do that? I grepped with: grep Sun messages* but with this command, if there server was never rebooted, i cannot recognize the server type. any other idea? thx in advance Ivan (5 Replies)
Discussion started by: beta17
5 Replies

4. Shell Programming and Scripting

Identify age of the file.

Hi all, I'm using SunOS. need to find age of the file in terms of seconds. The file name with its path will be given to the script as input. Any kinda help will be appreciated. Thanks in advance (7 Replies)
Discussion started by: bankimmehta
7 Replies

5. Solaris

How to identify which type of Apache is installed?

Hi, I need to find out which type of Apache is installed. following is the list of Apache types Covalent, IBM HTTP, HP Apache-based, Oracle, Stronghold and may be some other as well. If anyone know how to figure out this, please share it with me. Thanks Sarwan (3 Replies)
Discussion started by: sarwan
3 Replies

6. Linux

how to identify the raid type on Linux?

Hi any idea on why I am getting this? /sbin/mdadm --detail /dev/md0 mdadm: md device /dev/md0 does not appear to be active. thanks. (2 Replies)
Discussion started by: melanie_pfefer
2 Replies

7. AIX

how to identify the raid type on aix

hi how to identify the raid type on aix? thx (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

8. Programming

array type has incomplete element type

Dear colleagues, One of my friend have a problem with c code. While compiling a c program it displays a message like "array type has incomplete element type". Any body can provide a solution for it. Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies

9. Shell Programming and Scripting

how to identify the type of shell using comands..

Dear friends, please tell me how to identify the type of the shell (whether cShell, kshell or anything else) please tell me the command. waiting for ur reply.... regards, swamymns (2 Replies)
Discussion started by: swamymns
2 Replies
Login or Register to Ask a Question