LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 05-03-2005, 11:00 AM   #1
supersucker
Member
 
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, 11:52 AM   #2
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

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

Rep: Reputation: 53
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)
 
  


Reply


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 01:44 AM
Determining Whether HTTP File Exists overbored Linux - Software 1 05-22-2004 01:30 AM
CGI in C: need help determining mime types of files Sm0k3 Programming 1 01-26-2004 10:55 PM
determining file system 24jedi Linux - General 2 07-31-2003 10:26 AM
determining a binary file debdas Programming 3 05-05-2003 06:18 AM


All times are GMT -5. The time now is 08:29 PM.

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