Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-03-2005, 12:00 PM   #1
Registered: Jul 2004
Location: Berlin
Distribution: fedora 3
Posts: 79

Rep: Reputation: 15
determining file types

hi everybody,

how can i determine the type of a file?

for example, how do i know wether a file is a symbolic link or the "real file"?
or wether a file is compressed with gzip or bzip? (in case the ending of the file name isnt something like .gz or bzip....)

"man ls" didnt really help me.......

thx in advance.....
Old 05-03-2005, 12:52 PM   #2
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
file filename
Old 05-03-2005, 01:29 PM   #3
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 54
file filename
will tell you the type of file, or more generally:
ls -l

will show whether it is a regular file or a symbolic link (the file permissions of rwxrwxrwx have a lower case L in front of them)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining MIME Type of a File Jose Muņiz Linux - General 2 08-16-2004 02:44 AM
Determining Whether HTTP File Exists overbored Linux - Software 1 05-22-2004 02:30 AM
CGI in C: need help determining mime types of files Sm0k3 Programming 1 01-26-2004 11:55 PM
determining file system 24jedi Linux - General 2 07-31-2003 11:26 AM
determining a binary file debdas Programming 3 05-05-2003 07:18 AM

All times are GMT -5. The time now is 11:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration