Top Ten Concepts For Linux Beginners - Number 2, Directories
- Date: 2008-04-13 - Word Count: 547
Share This!
Linux people are fond of saying that directories are just another type of file. This statement can be misleading. We saw in the previous article that you use a file editor to create a file. We will see later in this article how to create a directory.
So what exactly is a Linux directory? A directory is a collection that may include one or more directories, one or more files, or in fact be empty. You can think of a directory as a file folder, or as a loose-leaf notebook that contains dividers (themselves directories) and pages (files.) Just like a notebook page may not contain a divider, a Linux file may not contain a directory.
Up to now our comments about Linux directories hold for Windows directories as well. Now let's take a look at some differences between these two systems. First come the naming conventions. Linux distinguishes between lower-case and upper-case characters in directory names. Microsoft Windows does not. For example, Linux treats pay12june and Pay12june are as two different directories, as different as pay12june and heighho. These directory names were used as file names in the previous article. While Linux does have some reserved directory and file names, in general one cannot tell by the name whether it is a file name or a directory name. So be careful. Linux helps you out here ' the ls command that lists the contents of a given directory usually displays files and directories in different colors.
Directories are hierarchical. They are similar to a tree or a family tree. But unlike a tree (or Microsoft Windows) Linux has only one root. The root, designated as / lies at the top, rather than at the bottom, of the hierarchy. Right underneath the root directory you will find several subdirectories. For example, the /home directory is a child of / the root directory. The number and names of the first-level subdirectories vary from one version of Linux to another. For example, some Linux distributions include a /root directory while others do not. The /root directory (or subdirectory, both terms are used) is a child of /, the actual root directory.
The /home directory is an important directory. It is divided into subdirectories, one for each user. We like to work with Damn Small Linux, a free version of Linux that runs on the Windows desktop and requires only 50 Megabytes of disk space. Damn Small Linux automatically creates a user called dsl whose home directory is /home/dsl ; a working area essentially reserved for this user. All versions of Linux subdivide the /home directory into user subdirectories applying this simple naming convention.
Linux provides several commands for working with directories. For example, the mkdir command creates a directory. The rmdir command removes a directory, but in the simplest case only if it is empty. The cd command changes the working directory, the directory in which you are positioned. The pwd (print working directory) command displays (not prints) the working directory. Beginners should use this command a lot to reduce errors. For example, if you, the dsl user, think that you are positioned in the /home/dsl directory but in fact are positioned in the / directory you won't be able save your files with a simple command. Why? Because you lack the requisite permission, the subject of our next article.
So what exactly is a Linux directory? A directory is a collection that may include one or more directories, one or more files, or in fact be empty. You can think of a directory as a file folder, or as a loose-leaf notebook that contains dividers (themselves directories) and pages (files.) Just like a notebook page may not contain a divider, a Linux file may not contain a directory.
Up to now our comments about Linux directories hold for Windows directories as well. Now let's take a look at some differences between these two systems. First come the naming conventions. Linux distinguishes between lower-case and upper-case characters in directory names. Microsoft Windows does not. For example, Linux treats pay12june and Pay12june are as two different directories, as different as pay12june and heighho. These directory names were used as file names in the previous article. While Linux does have some reserved directory and file names, in general one cannot tell by the name whether it is a file name or a directory name. So be careful. Linux helps you out here ' the ls command that lists the contents of a given directory usually displays files and directories in different colors.
Directories are hierarchical. They are similar to a tree or a family tree. But unlike a tree (or Microsoft Windows) Linux has only one root. The root, designated as / lies at the top, rather than at the bottom, of the hierarchy. Right underneath the root directory you will find several subdirectories. For example, the /home directory is a child of / the root directory. The number and names of the first-level subdirectories vary from one version of Linux to another. For example, some Linux distributions include a /root directory while others do not. The /root directory (or subdirectory, both terms are used) is a child of /, the actual root directory.
The /home directory is an important directory. It is divided into subdirectories, one for each user. We like to work with Damn Small Linux, a free version of Linux that runs on the Windows desktop and requires only 50 Megabytes of disk space. Damn Small Linux automatically creates a user called dsl whose home directory is /home/dsl ; a working area essentially reserved for this user. All versions of Linux subdivide the /home directory into user subdirectories applying this simple naming convention.
Linux provides several commands for working with directories. For example, the mkdir command creates a directory. The rmdir command removes a directory, but in the simplest case only if it is empty. The cd command changes the working directory, the directory in which you are positioned. The pwd (print working directory) command displays (not prints) the working directory. Beginners should use this command a lot to reduce errors. For example, if you, the dsl user, think that you are positioned in the /home/dsl directory but in fact are positioned in the / directory you won't be able save your files with a simple command. Why? Because you lack the requisite permission, the subject of our next article.
Related Tags: internet, free, security, download, windows, operating system, linux, open source, damn small linux
Levi Reiss has authored or co-authored ten books on computers and the Internet. He loves the occasional glass of wine as exemplified by his wine websites including www.theworldwidewine.com. He teaches Linux and Windows operating systems plus other computer courses at an Ontario French-language community college. Visit his new website http://www.linux4windows.com which enables you to download and run Damn Small Linux on even outdated Windows computers. Your Article Search Directory : Find in Articles
Recent articles in this category:
- Using Keywords Effectively For an SEO Campaign
Keyword research is one of the most crucial parts of an SEO campaign. If you end up choosing the wro - Search Engine Optimization Copywriting Tips
SEO copywriting is not as technical as it sounds but is different from traditional copywriting for t - 3 Tips to Make Money Using Videos
For the last five years video has been a real success in the internet. Now you can find video in alm - Is Social Media Networking Your Next Strategy For Your Online Marketing?
When you try to work on online promotion and online marketing, social media especially social media - Submitting a URL of Your Website
People who make a website usually do research on how to improve not only the quality of their websit - 5 Bad Habits of Article Marketing
There are many ways to advertise your company but having a highly ranked website is the best. Most p - Facts About SEO Services Company
SEO services companies are becoming very popular in the internet marketing world but there are some - 4 Ways Search Engine Optimization Can Be So Powerful
Whether you are an affiliate marketer, small businessman or a large organization, your first step wh - A List of 3 Options For Internet Business
The trend of making money through online business has become trendy now a day. People are shifting t - Getting the Best Affiliate Products For Your Site
Making money online was never so difficult before. There are numerous ways through which you can mak
Most viewed articles in this category:
- The Revolutionized Ebay Etailsolution Software
With the help of eBay, the auction business has received a new meaning. With the help of the many eB - Internet Millions - by Ryan Orrell - Honest Review
REVIEW: "Internet Millions", by Ryan Orrell, is a refreshing new kind of internet marketing e-bo - A Google Adsense Addiction
54% of all Google Adsense publishers admit addiction to click income. A recent online study conducte - Lead Generation for Top Residual Income
At the heart of any good residual income business is a person who knows how to generate leads. Lead - Make Money With Information Ebook Products: The Other End
I don't like thinking of myself as the kind of person that has made it rich on the internet, but in - Repeat Business Equals a Residual Income Stream
Residual income comes from other people reacting to a single action by the business owner. What bet - The NFL & United Way
There are many ways that NFL players help with the United Way. First of all, they donate a lot of th - Seo - Making Money Writing Seo Reviews
If you are a reviewer or critic you are likely to find work writing reviews of products and services - Understanding Perfume Types
Understanding the various varieties of perfume can help to cut through the difficulty in selecting a - Ecommerce Basics: Three Things To Avoid
When you decide to put your ecommerce website together there are a few mistakes that are easy to mak