Posts Tagged ‘Lower Case’
January 30, 2010 in Linux Client | Comments (1)
Tags: Different Colors, Directory Name, Directory Names, Divider, Family Tree, File Folder, File Names, Hierarchy, Home Directory, Linux Beginners, Linux Directory, Linux Windows, Loose Leaf Notebook, Lower Case, Microsoft Windows, Naming Conventions, Root Directory, Subdirectories, Upper Case Characters, Windows Directories
Linux people like to claim that directories are really just another type of file. This statement can be misleading. We saw in a previous article that you create a file using a file editor. We will see later in this article how to create a directory.
So just what 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 may think of a directory as a computerized file folder or 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 always 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 the directories 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 resemble 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 Linux versions subdivide the /home directory into user subdirectories according to this simple naming convention.
Linux provides several commands to process directories. For example, the mkdir command creates a directory. The rmdir command removes a directory, but in the simplest case only when 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 run this command often 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.
By: Levi Reiss
December 8, 2009 in Linux Client | Comments (0)
Tags: Computer Nerd, damn small linux, Email Messages, Gruesome Details, Left Hand Corner, Linux Commands, Linux Operating System, Linux Text, Linux Tutorials, Lower Case, Mac Programmers, Notepad, Programming Languages C, Text Editors, Text Processor, Unix Dos, Upper Case, Versions Of Linux, Web Page Editing, Windows Computers
Damn Small Linux is an excellent tool for learning Linux commands and running the Linux operating system. But what if you don’t plan to be a computer nerd; can this software still be useful? The answer is a definite yes; you can make use of this tiny operating system whether or not you want to learn the sometimes gruesome details of operating systems. This article introduces the text editors that come with your free Damn Small Linux that runs on even obsolete Windows computers. You can use these applications to compose simple text or programs of any level of complexity.
Once you have downloaded and installed Damn Small Linux there are several equivalent ways of launching its text editors. You can click on the DSL button in the lower-left hand corner or on the Apps icon toward the top of the screen. Then open the Editors: there are four, Beaver, Nano, Notepad, and vi (actually vim). We will look at these editors in order plus an additional one.
Beaver is my choice for creating and editing the text files used in my Damn Small Linux tutorials. The name Beaver stands for Beaver is an Early AdVanced EditoR which is the kind of joke that many Linux and Unix people find funny. This editor is particularly useful for programming and web page editing. Beaver’s special features include color coding and the ability to convert text to Upper Case, Lower Case or to capitalize the first letter of every word. You can convert text among the following formats: Unix, DOS, and Mac. Programmers will be glad to know that Beaver formats code for the following programming languages: C/C++, HTML, Perl, JavaScript, PHP, and Bash. Unfortunately there is no Help function.
The nano program is especially used for email messages. It stems from the widely used Pico email program that is not available for some versions of Linux. I have not worked with nano but am told that many Linux and Unix people like it.
What the Damn Small Linux people call Notepad is actually another text processor that is similar to the DOS/Windows Notepad. I haven’t used it because Beaver is more powerful, and just about as easy to use.
The final application in this group is VIM, vi IMproved. The original vi was a very-widely used text editor for Unix and Linux systems. Today almost all Unix and Linux people work with other, more sophisticated text editors. When I teach Linux on systems other than Damn Small Linux I teach a reduced version of vi. This editor is cumbersome, but you make like the improved version. Damn Small Linux offers you a choice.
The Office folder includes Ted, a word processor which is compatible with Microsoft Word. Ted saves documents in RTF (rich text format) that can be read by Microsoft Word and other word processors including Open Office. Ted and Beaver belong to different worlds; you can’t take documents back and forth between these two applications.
By: Levi Reiss
December 7, 2009 in Linux Client | Comments (0)
Tags: Conflict, Confusion, damn small linux, Familiarity, Hard Disk, Hard Drive, Linux Beginners, Linux Environment, Linux Fan, Linux Files, Long File Names, Lower Case, Microsoft Windows, Misunderstanding, Number 1, Unique Names, Upper Case Characters, Usb Flash Drive, Windows Environment, Windows Users
Of course if you are used to Microsoft Windows you are familiar with the concept of files. This familiarity means you won’t have to start from zero to learn about Linux files. However, you will have to relearn several concepts and techniques to work with files in the Linux environment, whether using Damn Small Linux or other versions. You can do several great things with Linux files that you can’t do easily or at all under Windows. This could be just one more reason to switch from Windows to Linux.
Files have unique names. This rule is not as simple as it may seem. There is no conflict between a hard disk file named pay12june and a file named pay12june on your removable USB flash drive. In fact, be sure to backup all your important files. Don’t worry if your hard drive file is erased or becomes corrupted and illegible, simply access the one on your flash drive. You could also have two files named pay12june on your hard drive in different directories. Directories, collections of directories and files, will be discussed in the next article in this series.
Linux distinguishes between lower-case and upper-case characters in file names. Microsoft Windows does not. For example, Linux treats pay12june and Pay12june as two different files, as different as pay12june and heighho. Windows users will have to adapt to this major difference. Even though I am a Linux fan I don’t see any advantage in the Linux way of naming files. Maybe I have spent too much time in the Windows environment.
File names should be relatively short. The allowed maximum is 255 characters but working with long file names is no fun and in fact is asking for trouble. Linux file names may not contain the character / which has a special meaning. To avoid misunderstanding don’t include special characters such as $ and & in your file names. Doing so could cause confusion and lead to hard-to-find errors. For the same reason don’t call your files by special Linux names such as etc.
Linux sometimes applies file extensions; common examples include .c to indicate a C-language program and .htm or .html to indicate one type of web page. Savvy Linux users often avoid coding the file extension but rely on the file directory to indicate the file type. Don’t give a Linux file a misleading file extension.
Use an editor to create or modify a text file. The old fashioned vi editor has been replaced by more powerful, user-friendly editors. Most versions of Linux come with several editors. Damn Small Linux, a popular version that runs under Windows, includes several editors such as Beaver that come quite close to being intuitive.
Linux provides an enormous variety of commands for processing files. Many of these commands are mnemonic; for example the command cp is used to copy files. Many commands include a wide variety of options. Consider the ls command, somewhat similar to the DIR command in the Windows environment. This seemingly simple command is quite rich and offers dozens and dozens of options many of which have no equivalent in the Windows environment.
Linux commands can be thought of as verbs. Just like most English sentences include more than a verb (go, jump) complete Linux commands contain the command itself and one or more objects. To copy a file you not only need to specify cp but also What and Where. For example, the command cp pay12june backuparea means copy the pay12june file into the backuparea directory.
Linux syntax (grammar rules) is quite strict and does take time to learn. But mastering Linux and associated technologies can lead to employment. The next step is mastering Linux directories.
By: Levi Reiss