Search this Website

 

Ubuntu

UNIX

determining type of file

Category: UNIX-Unix Beginner

determining type of file

hello,

i'm attempting to modify a script so it can be executed via a batch scheduler. part of the script calls a program called direct (which i believe may have something to do with connect direct). i have tried cat and vi on the file; cat returns absolute gibberish, vi states the file is executable.

i need to know the purpose of the program (it's inputs/outputs) and any parameters it requires. short of running it (it's on a live server) is there a way of finding out what type of program it is so i can view the code?

any help would be appreciated!



i think you need the "file" command

code:

# file myfile
check the man page of file.



thanks!

thanks ghostdog - exactly what i was after!

j.