Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
This is Soumya. I am a beginer with the Linux, my problem is how to
understand from the list that which one is document and which one is a file
and which one is a image/movie, and if it is a file then how to know that
what kind of file it is ??
If you mean from the output of the ls command, you cannot truly distinguish between types of files. Maybe the file name extension can be of some help, but take in mind that linux does not uses extensions as windows does. The most reliable tool to distinguish between file types is the file command. Example:
Code:
$ file testfile.doc
testfile.doc: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Title: , Author: spinton, Template: Normal.dot, Last Saved By: spinton, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Total Editing Time: 02:00, Create Time/Date: Thu Dec 4 09:38:00 2008, Last Saved Time/Date: Thu Dec 4 09:40:00 2008, Number of Pages: 1, Number of Words: 0, Number of Characters: 1, Security: 0
$ file testfile.txt
testfile.txt: ASCII text
$ file testfile.jpg
testfile.jpg: JPEG image data, EXIF standard 2.2
Regarding the ppt files, you need some office software, like OpenOffice, LibreOffice and so on.
Well, to be honest, extensions are still used, but mostly as a human construct. The underlying system itself doesn't care about them. Many individual programs can still base their operation on filename extensions also.
ls has a --color option, which will print different kinds of file in different colors. The defaults can be changed with the DIRCOLORS shell variable, and that can be generated from file using the dircolors application. It's been covered many times in many places, so do some googling.
Well, to be honest, extensions are still used, but mostly as a human construct.
So very true. Back in the olden days, when I was a young 'un writing training materials in Display Write and later Word Perfect with 8 dot 3 filenames, we used extensions to associate the document to the course. Problem Solving was *.ps; Interpersonal Communication Skills was *.ics; and so on.
The "object oriented programming" became the buzzword of the da--er, all the rage. We no longer had files, we had "objects," and we could not object.
Who can stand against a nice mysterious-sounding buzzword with lots of syllables?
So very true. Back in the olden days, when I was a young 'un writing training materials in Display Write and later Word Perfect with 8 dot 3 filenames, we used extensions to associate the document to the course. Problem Solving was *.ps; Interpersonal Communication Skills was *.ics; and so on.
Sure, it depends on the operating system. For Linux they are commonly used e.g. for the bash completion (defined in /etc/profile.d/complete.bash in openSUSE). Starting a command like bunzip2 and by a TAB TAB on the keyboard you get a list only of the files having the proper suffix. Nevertheless any file with any suffix could be used.
N.B.:
In other OS like Open VMS all files and directories had a three character extension too, directories .DIR and a file was speficied by [DIR1.DIR2.DIR3]FILE.TXT (not to mention their nice versioning in the FILES-11 file system).
In Mac OS (without the X) they had the creator-code and type-code in the directory entries (the .mp3 in the examples are superfluous). By these entries in the directory the OS knew which application created a file, nevertheless any application accepting the right type-code could open it. But starting with Mac OS X 10.6 they no longer honor these directory entries and stick to the suffix for defining the type of file and having one defined application per type to open it by a double-click.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.