LinuxQuestions.org
Review your favorite Linux distribution.
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 04-17-2004, 10:12 AM   #1
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Rep: Reputation: 15
file's extension???


what are the possible ways to find the extension of a file in linux? the file i am seeing obviously doesnt show any extension, also i cant find anything in its properties. kindly help me find the ways to make the file type.
i use red hat 9.

thanx a lot
regards
aman
 
Old 04-17-2004, 10:16 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
the extension?? well just look at the end of the filename remember that most of the time file extensions are utterly irrelevant. UNIX developers decided that it might be slightly better to actually work out what the file was rather than rely on a crude 3 digit code in the file name... try using the "file" command to find what a file is:


Code:
[chris@gonzo chris]$ file *
authorized_keys: ASCII text, with very long lines
INBOX:           directory
ls:              ELF 32-bit LSB executable, for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
mail:            symbolic link to /var/mail/forwarded/chris
old-mail:        sticky directory
 
Old 04-17-2004, 10:22 AM   #3
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 15
thanx a lot acid jus did it. this place is so cool i love being on LQ. and specially u guys the moderstors are really great guys. thanx a lot for ur help and support and i hope that ppl and newbies like me get that from u in future too as we are getting it at present

regards
aman
 
  


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
how to clear a file's content? iclinux Linux - Newbie 7 03-30-2009 03:01 PM
How do I use PHP to find a file's directory? a10waveracer Programming 3 09-06-2005 10:08 PM
Help! tar file's name is truncated auden Linux - Newbie 1 03-02-2005 10:09 PM
Critical system file's. Tarts Linux - Security 16 10-09-2003 11:06 AM
How to modify a file's attribute in shell? Xiangbuilder Linux - Newbie 1 09-06-2003 07:18 AM


All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
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