ICDL Module 2

Using a Computer and Managing Files with K Desktop Environment

David Varley

ICDL Foundation
IMPORTANT NOTICE
DISCLAIMER
License

2004


Table of Contents

1. Computer Environment
First Steps with the Computer
Start the computer
Shut down the computer
Restart the computer
Basic Information and Operations
View CPU information
View RAM details
View operating system version information
Configuration
Set, change keyboard language
Formatting
Installing and Uninstalling
Using Print Screen for Screen Captures
Use available Help functions
Print Help
Searching in Help
Using Help as a tutorial
Text Editing
Starting the Text Editing Application
Save the file to a location on a drive
Save an existing document
Save a new document
Closing the Text Editing Application
2. Desktop
Work with Icons
Select and move desktop icons
Open a file, directory/folder, application from the desktop
Work with Windows
Collapse, expand, resize, move, close a window
Switch between open windows
Open another desktop
3. Managing Files
Concepts
Storage Devices
Directories/Folders
Browse using the Home icon
Create a directory/folder and a further sub-directory/sub-folder
Open a window to display directory/folder name, size, location on drive
Working with Files
Count the number of files, files of a particular type, in a folder (including any files in sub-folders)
Change permissions on a directory
Change permissions on a file
Sort files by name, size, type, date modified
Understand the importance of maintaining correct file extensions when re-naming files
Re-name files, directories/folders
Duplicate, Move
Select a single file or directory
Select a group of adjacent files or directories
Select a group of non-adjacent files or directories
Duplicate files, directories/folders between directories/folders and between drives
Move files, directories/folders between directories/folders and drives
Importance of Backups
Delete, Restore
Delete files, directories/folders to the recycle bin/wastebasket
Restore files, directories/folders from the recycle bin / wastebasket / trash
Empty the recycle bin/wastebasket
Searching
Find Files
Search for files by content, date modified, date created, size, wildcards
View list of recently used files
Compressing Files
Compress files in a folder on a drive
Add files to an existing archive
Extract compressed files from a location on a drive
4. Viruses
Concepts
The ways a virus can be transmitted onto a computer
The advantages of a virus-scanning application
Handling Viruses
Using Virus Scanning Applications
Other Options
The Importance of Updating Virus-Scanning Software Regularly
5. Print Management
Setup
Install a new printer on the computer
Print Outputs
View a print job’s progress using a desktop print manager
Pause, re-start, delete a print job using a desktop print manage

Chapter 1. Computer Environment

First Steps with the Computer

Start the computer

  • Press the On/Off switch on front of the computer.

This will initiate the boot process. During this process the start-up routines that are stored in the ROM of the computer will take control of the computer. One of the things these routines do is to read certain areas of the hard drive to search for the operating system. The start-up routines will then load the operating system into the RAM of the computer and pass over control to it.

Depending on how the computer has been configured, one of three things will happen:

  1. The operating system will automatically load the GUI (Graphical user interface) and start this for a default user. The system will be available for immediate use.

  2. The operating system will automatically load the GUI, but you will be prompted to enter a username and password. These will be given to you by who ever installed the system.

  3. Only the text based operating system will load. In this case you will need to logon and then start the GUI. In this case you will see a black screen on which the prompt Logon: appears.

Suppose you have been given the username GenUser and password V2wTkN7. Remember that passwords are case sensitive. If you are given a password, you must enter it exactly as given.

Logon to the GUI

  1. When the logon window appears, type in your username and password exactly as given. When you type the password, for example V2wTkN7, a series of stars ****** will appear in the password window. This is so that no-one can read your password by looking over your shoulder.

  2. Click the Session Type window and select KDE.

  3. Click the GO button.

Logon to the text based interface and then load the GUI

  1. Type your username (for example, GenUser)after the logon prompt. Press Enter.

  2. When asked for your password (for example, V2wTkN7), type it in. Press Enter.

  3. Type startx and press Enter. This command will load the GUI after you have logged on.

[Note]

Unless you have a valid username and password, you will not be able to log on to the system. Speak to the administrator of your system if you cannot log on.

[Note]

In Linux, there is a special user logon called root which has complete access to the system. When a user logs on as root, he or she can do anything on the machine. Even if you know the root password, do not log on as this user unless you are carrying out special administrative activities. For ordinary use, use a username that has more restricted access.

Shut down the computer

  1. Click the Start Applications icon at the bottom left of the screen.

  2. Click Logout on the main menu .

  3. Click the Turn off computer radio button in the dialogue which appears and click OK.

[Warning]

Never just shutdown the computer by pressing the On/Off switch.

Restart the computer

The appropriate routine

Follow the same method as for shutting down the computer except for the last step in which you select Restart computer.

Shut down a non-responding application

It may happen that an application freezes and will not respond to mouse clicks or keyboard commands.

[Note]

For simplicity a sequence of menu options such as the above will be indicated as: Start Application->Applications->Monitoring->KDE System Guard

  1. Give the application a while. It sometimes happens that a non-responding application wakes up.

  2. Click on the Start Applications icon.

  3. Click the following in sequence: Applications then Monitoring then KDE System Guard.

  4. Click the Process tab.

  5. Select All Processes.

  6. Highlight the non-responding application.

  7. Click the Kill icon to shut down the application.

  8. When done, File->Quit or press Ctrl-Q or click the Close icon in the top right of the screen.

What to do if the entire system freezes

[Note]

If the entire system freezes, do not immediately switch of the system with the power switch. This could cause serious damage to the entire system. This is only a final resort. The most likely cause of a frozen system lies with the GUI.

  1. Wait a while. The system may wake up of its own accord.

  2. Press Ctrl+Alt+Backspace.

[Note]

This will cause you to loose all unsaved work, but it will preserve the system itself.

Basic Information and Operations

Abstract

View the computer’s basic system information: operating system and version number, installed RAM (random access memory).

View CPU information

  1. Start Applications->Configuration->KDE->Information->Processor

  2. Click Close when done.

View RAM details

  1. Start Applications->Configuration->KDE->Information->Memory

  2. Click Close when done.

View operating system version information

This information can also be found in a number of places. For example:

  • Start Applications->Configuration->Configure your Desktop. This displays the KDE Control Centre.

This gives you details of the Linux kernel you have installed on your system. In this case it is version 2.4.22-10.

Each of these numbers has a special meaning:

2

The second major release of the Linux kernel.

4

The fourth minor release of the second major release. The fact that it is an even number means that it is a stable release. If it were an odd number, it would indicate that the version is not yet fully tested.

22

The twenty second patch of the above release. A patch contains minor corrections to a version.

10

Build ten. A build contains even smaller changes than those found in a patch.

Configuration

Abstract

Change the computer’s desktop configuration: date & time, volume settings, desktop display options (colour settings, screen pixel resolution, screen saver options).

[Note]

In order to carry out some of the changes to the system, you will need to know the root password.

Set date and time

  1. Right click on the clock in the bottom right of the screen to display a context menu.

  2. Enter the root password when prompted.

  3. Adjust the date and time on the calendar and clock.

  4. Click OK when done.

An alternative method is to use:

  • Start Applications->Configuration->KDE->System->Date & Time.

Set volume level

  1. Start Applications->Multimedia->Sound->KMix.

  2. Adjust the volume level using the left-most slider.

  3. File->Quit or click the Close icon when done.

Get information on sound card

  • Start Applications->Configuration->KDE->Information->Sound

Set desktop options

The main method of changing the appearance of the desktop is through:

  • Start Applications->Configuration->KDE->LookNFeel.

Change colour settings
  1. Start Applications->Configuration->KDE->LookNFeel->Colors.

  2. Select the colour scheme.

  3. Adjust contrast, if necessary.

  4. Click OK when done.

Change screen saver
  1. Start Applications->Configuration->KDE->LookNFeel->Screen Saver.

  2. Select the screen saver and set the time before the screen saver is displayed.

  3. If you wish, set a password to stop screen saver. This will automatically protect your work should you leave your machine unattended for a period of time.

  4. Click Apply.

Disable the screen saver
  1. Remove the cross in the Start screen saver automatically check box.

  2. Click Apply.

Set desktop background
  1. Start Applications->Configuration->KDE->LookNFeel->Background.

  2. Configure the background as you wish it. You may also use a background wall paper.

  3. Click OK.

Set screen pixel resolution
  1. Start Applications->Configuration->Configure your Computer.

  2. Enter the root password when prompted and click OK. This will launch the Mandrake Control Centre.

  3. Click Hardware in the left hand pane.

  4. Click Change your screen resolution in the left hand pane.

  5. Adjust the screen resolution and number of colours.

  6. Click OK when done.

  7. File->Quit or press Ctrl-Q.

Set, change keyboard language

The keyboard language define the position of the various keys on the keyboard. For example, British, American and French keyboards all have different layouts. If some of the keys generate a different letter to that shown on the key itself, it could be that the keyboard language setting needs to be changed.

  1. Start Applications->Configuration->Configure your Computer.

  2. Enter the root password when prompted and click OK. This will launch the Mandrake Control Centre.

  3. Click Hardware in the left hand pane.

  4. Click KeyboardDrake in the left hand pane.

  5. Select the keyboard layout.

  6. Click OK when done.

  7. File->Quit or press Ctrl-Q.

Formatting

Abstract

Format removable disk media: diskette, Zip disk.

Before data can be saved on a disk, it has to be prepared. The process of preparing a disk to store files is called formatting. If a disk has been previously formatted, formatting a second time will result in the loss of any data that may have been stored on it.

Format a floppy disk via GUI

  1. Make sure the disk you wish to format does not contain any data you will need.

  2. Insert the diskette into the diskette drive.

  3. Start Applications->Configuration->Hardware->KFloppy

  4. Select the File system.

    If you use DOS, you will be able to share the disk with Windows users. If you use ext 2, you will only be able to share it with Linux users.

  5. Give the diskette a label.

    This is the electronic label that the formatting process attaches to the disk.

  6. If the disk has been formatted previously, you can select Quick format.

    This makes use of the previous format to speed up the process.

  7. Click Format.

Once the disk has been formatted, you can save files to it.

Format a diskette using a terminal

An alternative method of formatting a floppy disk is to open a terminal and type in the appropriate command.

Terminal windows give you access to the full power of Linux. The GUI simplifies the process of executing much of the power of Linux. Typing in the actual commands at the command prompt allows you to execute all the variations of Linux commands. The following example illustrates how to use the command line.

[Note]

When you use a terminal to enter commands, you must press the Enter key at the end of each line. Further commands are case sensitive. If a command does not work, check that you are typing the command exactly as required. For example, mkfs is correct but Mkfs and MKFS will not work.

  1. Insert the floppy disk to be formatted.

  2. Start Applications Terminals Konsole.

  3. Type in the following command exactly as shown and press Enter:

    /sbin/mkfs.msdos /dev/fd0

Format a zip disk for use in Linux only

If you wish to format the diskette in Linux format, you would use: /sbin/mkfs.ext2 /dev/fd0. In this case you would not be able to share the disk with Windows users.

In order to format a zip disk, you would need to use a terminal.

  1. Insert the zip disk to be formatted.

  2. Start Applications Terminals Konsole.

  3. Type in the following command exactly as shown and press Enter: /sbin/mkfs.ext2 /dev/sd0

This will format the zip disk in ext2 format. This disk can only be shared with Linux users.

Format a zip disk to share with Windows users

If you wish to share the zip disk with both Linux and Windows users, you will need to use the vfat file system.

  1. Insert the zip disk to be formatted.

  2. Start Applications Terminals Konsole.

  3. Type in the following command exactly as shown and press Enter: /sbin/mkfs.vfat /dev/sdo

Installing and Uninstalling

Abstract

Install, uninstall a software application

Install applications from distribution CDs

Mandrake Linux maintains a database of applications and their locations. Initially these are applications that are stored on the distribution CDs. Depending on the particular installation, only certain of these may be installed on a given system. The following illustrates how to install KOffice from the Mandrake distribution CDs.

  1. Start Applications->Configuration->Packaging->Install Software.

  2. Enter the root password when prompted.

  3. Click All Packages by Group.

  4. Click on Office to expand its contents.

  5. Click on KOffice. A window appears warning you of dependencies. A dependency refers to other software which needs to be installed on the machine before the application can be installed.

  6. Click OK. A tick will then appear next to KOffice.

  7. Click Install.

  8. When prompted, insert the required CD and click OK.

  9. Other prompts may appear. Respond by clicking OK if you wish to proceed with the installation.

  10. When the installation has completed a notification window will appear. Click OK.

  11. Verify that the application has been installed. In this case use:

    Start Applications->Office->Word Processors->KWord.

Install applications from a CD with an install program

You may get an application as part of a CD or through a download across the Internet. In some cases these applications are distributed with an install file. Double clicking on this in a file manager will initiate an automated installation process. You would simply sit back and wait for the entire process to complete.

Install an application using the File Manager

The following illustration assumes the application is located on a CD.

  1. Double click on the CD-ROM icon on the desktop.

  2. Locate the directory in which the application installation file is located. This process will be explained fully in the section called “Directories/Folders” on directories.

  3. Double click on the application.

Uninstall an application

The following example illustrates how to uninstall the application xterm.

  1. Start Applications->Configuration->Packaging->Remove Software.

  2. Enter the root password when prompted.

  3. Click OK if the welcome screen appears.

  4. Click on Workstation and then Console Tools.

  5. Click xterm.

  6. Click Remove.

Using Print Screen for Screen Captures

Abstract

Use keyboard print screen facility and paste contents into a document.

You can take a snapshot of the screen you are working on and use it in a document.

  1. Press the Print Screen button on the keyboard. It may be abbreviated to Prt Scr or similar.

    This activates an application called KSnapshot which captures an image of your screen.

  2. Click the Save Snapshot icon.

  3. Specify a name and location in which to save the snapshot.

    The snapshot will be saved in png format.

    The image can now be inserted into a document in the same way you would insert any graphics file by opening the document and doing the following:

    1. Click on File->Insert->Graphics.

    2. Browse to the directory / folder containing the file.

    3. Click the filename of the graphic you wish to insert and click Open or simply double click on it.

      This will insert the graphic into the document at the current cursor position.

Use available Help functions

The KDE desktop comes with a number of manuals in electronic form.

  1. Start Applications->Documentation->Help

  2. Click KDE User's Manual to expand its contents.

  3. Click on First Impressions to expand the chapter into its sections.

  4. Click on Desktop Components. The right hand pane will display information on this topic.

Print Help

If you find it difficult to read the help on-screen, you can print the contents of the current window.

  • File->Print .

Searching in Help

The search function only allows you to scan the currently displayed topic.

  1. Edit->Find or press Ctrl+F.

  2. Enter the text you wish to find. Notice the various options that you can set when carrying out a find.

  3. Press OK.

The first occurrence will be highlighted in the text of the help. You will be prompted if you wish to locate the next occurrence.

Using Help as a tutorial

Become as familiar as possible with the help system. These notes will provide you with an introduction to Linux using the KDE desktop. When you have worked through a section in these notes, you could read what the KDE help system has to say on the topic. If you wish to become an expert, you will need to read further and discover the full power of Linux and KDE. The help system is the best place to start.

Text Editing

Abstract

Launch a text editing application. Open, create a file.

Starting the Text Editing Application

  1. Click on Start Applications

  2. Click Programming

  3. Click on Editors

  4. Click on Kedit

The Kedit editor will now display. There are other editors available, but we will use Kedit for now. The components of the screen are shown below.

[Note]

Because we will be making extensive use of the Menu bar, we will make use of the following convention in using the functions of the menu bar.

  • File->Save

Will mean exactly the same as

  • Click File on the Menu bar.

  • Click the Save option in the menu.

Close Kedit

  • File->Quit

This will close all open documents and exit Kedit. If you have made any modifications to open documents, Kedit will remind you that the document has not been saved and ask you whether you wish to save or keep it. It will also give you the option of canceling the Quit operation.

Open a file

One of the advantages that text editors provide for us is the facility to save our work and recall it at a later time. We can then print our work or make further changes (edit). In addition, we are able to create many versions of the same document, each of which can be saved on our hard drive under an appropriate name.

To open a document:

  • File->Open.

    The Open dialogue will appear. In general, this will point to your home directory.

    In this case, the Open dialogue is pointing to the directory /home/wendi.

    1. If necessary, navigate to the desired directory.

    2. Highlight the file you wish to open.

    3. Click OK.

If you wish to open a file contained on your floppy, navigate to the directory /mnt/floppy.

On the top right of the Open dialogue, there are three important icons:

Up one level: Pressing this icon will move you to the parent of the current directory.

Create new directory: This option allows you to create a new directory in the current directory. In order to be able to do so, you will need the appropriate user rights.

Default directory: Pressing this icon will move you to the default directory. This is useful if you have moved through several directories and wish to return to your starting point in the directory tree. This will be different for each user.

Create a new document

[Note]

We will use the terms document and file interchangeably.

To create a new document from scratch:

  • File->New

This will display a blank screen in which you can create a document. This document will be based on default settings. Default settings are ones which are set up for you automatically.

Save the file to a location on a drive

When you work with a document on your computer, the working form resides in the computer's RAM. This is temporary memory used for your current activities. Since RAM is volatile, when the computer is switched off, everything that is in RAM is automatically lost. In order to keep your work you will need to transfer the contents of RAM to your hard disk. This process is called saving.

When you save a document, you give it a name and you specify where it is to be stored.

Save an existing document

If you have opened a document and made some changes, the process of saving it is very simple:

  • File->Save

This will change the contents of the stored version so that it is identical to the version that is displayed on your screen. In this case, the previous version on disk is overwritten.

If you use File->Save in a newly created document, Kedit will automatically assume that you wish to use File->Save as.

Save a new document

When you create a document from scratch, there is no version stored on disk. To save the file to disk:

  • File->Save as.

    The Save as dialogue will appear. In general, this will point to your home directory. It is very similar in appearance and functionality to the Open dialogue.

    1. If necessary, navigate to the directory in which you wish to save the file.

    2. Enter a name into the Location window.

    3. Click OK.

For the moment we will not be concerned with all the options in the Save as dialogue.

Closing the Text Editing Application

  • File->Quit

Chapter 2. Desktop

[Note]Terminology
GUI (Graphical User Interface)

A GUI is a system that allows the user to interact with the operating system through clicking on icons on the screen. Icons are graphical representations of operating system functions. At its heart, Linux is a text based system. This requires you to type commands out in full. GUIs were developed to simplify the use of Linux for the desktop user. As you become expert in the use of Linux, you will need to become familiar with the text based system. This is not, however, the objective of these notes.

Distributions

A distribution is a bundled set of CDs which include the heart of the Linux operating system, known as the kernel, together with a set of applications. Each distribution in turn implements Linux slightly differently.

Desktop

The desktop is the actual GUI itself. There are a number of different desktop systems. The most popular are Gnome and KDE. The actual implementation of a desktop varies from distribution to distribution. KDE used with the Mandrake distribution will differ somewhat from when used with the Red Hat distribution. These notes are based on KDE running under Mandrake Linux 9.2

Work with Icons

Abstract

Recognize common desktop icons such as those representing: files, directories/folders, applications, printers, recycle bin/wastebasket.

The following screen illustrates a number of icons on the desktop.

CD-ROM and Floppy give you direct access to these devices.

Directories (folders) are presented by a directory icon as illustrated by Urgent.

Home is a shortcut to your home directory. When new users are added to the system, Linux creates home directories for them. As users do not have rights to other users' directories, the home directory provide a private location for the storage of files. The one exception is root who has complete access to the system.

Trash is a storage location where files are placed after they have been deleted. If trash has not been emptied, you can recover files you have deleted.

There are also desktop icons representing applications such as a word processing or spreadsheet application and other icons that represent printers eg, Laserjet 6L or Admin Deskjet.

Files can also be saved to the desktop. This will be explained in section 2.2.1.4. The desktop is a useful place to save work in progress as you then have immediate access. Files are represented by an appropriate application icon. In the above screen, Linux.swx is an OpenOffice.org Writer file while Sales.sxc is a Calc file.

Select and move desktop icons

You can move icons to a different position on the screen by dragging them. This allows you to group related icons in clusters.

  1. Click on a icon to select it.

  2. Hold down the left mouse button and drag the icon to its new position.

  3. Release the left mouse button.

Open a file, directory/folder, application from the desktop

Open a directory from the desktop

A directory is a location in which files are stored. You may visualise a directory as a drawer of a filing cabinet in which ordinary files are stored. Just as you would label the drawers of a filing cabinet, you give each directory an appropriate name. In many ways a hard disk drive is very much like a room containing many filing cabinets.

A directory may contain files of any type. It may also contain other directories. Directories which are located inside other directories are called sub-directories.

  • Double click on Home. This will open the Konqueror browser and display the contents of your home directory.

Notice that this directory contains a number of files and other directories.

Open an application from the desktop

  • Double click on an application icon on the desktop such as the icon representing OpenOffice.org.

This will open the application and you will then have to use the application's Open command to access the file.

A shorter method would be to double click on a file associated with an application which will open the file in the appropriate application. For example, if you wished to open the spreadsheet called Sales.sxc, you would normally have to load Calc, then use File->Open and locate the file. If you had saved it to the desktop, doubling clicking on the icon would open Calc and then load the spreadsheet.

Create a desktop shortcut icon, desktop menu alias

Save a file to the desktop

Suppose you are working on a file in Writer called Costs.sxw and you wish to save it to the desktop.

  1. In Writer, File->Save.

  2. Select the sub-directory called Desktop in your home directory.

  3. Click Save.

Create a shortcut to a menu item

Suppose you use Writer and Calc on a regular basis. Instead of accessing them through the menu system, you can place shortcut icons on the desktop.

  1. Right click anywhere on the desktop.

  2. Create New->Link to Application

  3. Click the General tab and enter the label Writer.

  4. Click the Execute tab and enter the command oowriter (all in lower case).

  5. Click OK.

    An icon will be displayed on the desktop. In order to use this method you need to know what command to use to run the application. How to determine this is explained in the following section.

  6. Double click on the desktop icon to run the application.

Determine the command name of an application

Suppose you wish to determine the command to run Calc.

  1. Right click on the Start Applications icon.

  2. Click Menu Editor.

  3. Scroll down to the Office entry and click on it to expand.

  4. Scroll down to the Spreadsheets entry and click to expand.

  5. Click on OpenOffice.org Calc.

  6. Read of the Command. In this case it is oocalc.

  7. Use this command to create a shortcut icon to Calc on the desktop.

Create a desktop shortcut to the KDE Control Centre

The KDE control centre provides the main tool for configuring your desktop. Using the menu editor, you could determine the command to run the control centre. This command is kcontrol.

  1. Right click on the desktop.

  2. Create New->Link to Application

  3. Click the General tab and enter the label KDE Control Centre.

  4. Click on the icon in the General tab, then click the Other icons radio button.

  5. Select an icon to be associated with the application and click OK.

  6. Click the Execute tab and enter the command kcontrol (all in lower case).

  7. Click OK.

  8. Go to the desktop and double click on the new icon.

    This will load the KDE control centre without having to access it through the menus.

Work with Windows

Abstract

Identify the different parts of a window: title bar, menu bar, toolbar, status bar, scroll bar.

The following screen uses OpenOffice.org Writer to illustrate the main components of an application window.

The title bar is where you can see the name of the application that is open. In this case OpenOffice.org. You will notice in the screen above the words Untitled 1 appear before the name of the application. This means that there is an unsaved document open. Once the document has been saved and has been given a name then the name will appear instead of Untitled 1.

Collapse, expand, resize, move, close a window

The icons relating to these functions are located in the top right hand corner of the screen.

Collapse a window

  1. The first is the Minimize button. This collapses the current window and displays an icon with the application's name in the panel at the bottom of the screen.

  2. To restore the application window, click on the application icon in the panel.

Close a window

Click the Close icon.

Resize a window

  1. Click the Cascade windows icon.This displays the window so that it only occupies part of the screen.

  2. Hover the mouse over one of the corners on the window.

    This will display a resize handle.

  3. Hold down the left mouse button and drag the corner to resize the window.

  4. Release the mouse button when you have the desired size for the window.

  5. Hover the mouse over one of the sides of the window.

    This will also display a resize handle. However these handles limit your movement either vertically or horizontally.

Move a window

  1. Click and hold down the left mouse button on the Title of the window. This is the blue area in the left hand top corner of the window.

  2. Drag the window to the new position.

  3. Release the mouse button.

Maximise a window

Click the Maximize window icon. This icon will only be available if the window has been cascaded.

[Note]

You cannot resize or move a window that has been maximized.

Switch between open windows

Where you have multiple open windows, each will be displayed as an icon on the panel at the bottom of the screen. Each icon will have a title. Usually the title is too long to be displayed in full.

  1. Hover the mouse over the icon to display the full title.

  2. Click on an icon to switch to that application.

    Where there are several windows open at once, KDE will try to group these. In the above screen, GIMP has four windows associated with it.

  3. Click on the icon containing multiple windows and select the window you wish to open.

Open another desktop

KDE goes one step further. You may open up to four different desktops at the same time. In each of these you may be doing a completely different type of work. The different desktops are also accessed from the panel.

  • Click the Desktop 2 icon to display a completely fresh desktop.You can operate in this desktop independently of what you are doing in desktop 1.

[Note]

The icons for open applications will be displayed in the panel irrespective of the desktop you are currently working in. If you click on one of these, you will automatically be taken to the desktop in which the window is open.

Chapter 3. Managing Files

Concepts

Abstract

Understand how an operating system shows drives, folders, files in a hierarchical structure.

To understand the concept of a directory, consider an analogy of an office block containing a number of offices. Each office has a name. Inside each office there are a number of filing cabinets, each of which is named. Files are stored in the filing cabinets. Each file also has a name.

Suppose a file called Lombard is located in the Staff cabinet of the Administration office. This could be described in a shorthand form as /Administration/Staff/Lombard.

In the same way /Stores/Suppliers/Kumar would indicate a file called Kumar in the Suppliers filing cabinet in the Stores office.

Directories on a computer system are similar to the offices and filing cabinets. A directory is a container that can contain files or other directories. A directory located inside another directory is called a sub-directory. Sometimes the word folder is used in place of the word directory. One difference between the analogy and a computer system is that in the former case we are dealing physical objects whereas in the latter we are dealing with a more abstract structure.

Directories, sub-directories and files are arranged in a hierarchical structure called a tree. A typical computer will contain many thousands of files stored in many directories. Each directory contains files that are related in some way. The starting point of the tree is called the root. Do not confuse this usage of the word with the special user that has complete control over the system. root is designated by the / symbol. This symbol is also used to separate the different levels of the hierarchy.

A directory structure may contain many levels of sub-directories. The following diagram illustrates part of a Linux system directory structure. Files are shown in Italic font.

The full description of the location of a file is called is path. If we wish to describe a file fully, we need to include its path. An example from the previous diagram would be: /home/david/letters/Tax(2004-04-04).

[Note]

Linux names are case sensitive. Hence the three names tax, Tax and TAX are all different as far as Linux is concerned. Using the wrong case for letters is a common source of errors.

[Note]

If you have worked with Windows, the Linux directory structure may seem confusing at first. Each system has a single directory system. Drives are located within branches of the structure rather than the structure starting with a drive. Linux goes much further and includes devices such as ports and printers within the directory structure. This follows from the fact that Linux treats files and devices in the same way.

The process of adding components to the Linux directory hierarchy is called mounting and removing them is called unmounting.

The home directory is of special importance in Linux. When a new user is added to the system, Linux creates a sub-directory of the same name in home. For example, if the user dorothy is added, Linux will create the directory /home/dorothy at the same time. This sub-directory is known as the user's home directory. Each user will create a further series of sub-directories in which he/she will store files.

Each user's home directory is private to that user. Apart from the owner of the home directory, the only other user that normally has access to it is the root user.

Each user can access his/her home directory by clicking on the Home icon on the desktop or by using Start Applications->Home.

Storage Devices

Abstract

Know that the devices used by an operating system to store files and folders are the hard disk, diskette, CD-ROM, network drives.

For long term storage, files are stored on various secondary memory devices. These include hard disks, floppy disks, CD-ROMs, DVDs, Zip disks, tape and flash memory. These devices were described in module 1.

Although we can think of directories as containers for files and sub-directories, these are logical structures rather than physical areas on a disk. The actual method of physically storing files on disk and organising them in directories is a very technical topic. From a user's perspective, the important thing is to understand directories as providing a logical method of grouping related files together in one place.

Where computers are connected together through a network, each user will see the disk drives on other computers as part of his/her own directory tree. In fact, if the user has not set up the system, he/she will not necessarily even be aware of the physical location of different parts of the directory tree.

One of the strengths of Linux is that it fully integrates a network into a single system.

Directories/Folders

Abstract

Navigate to a file, folder on a drive.

Browse using the Home icon

Click the Home icon either on Start Applications or on the panel or on the desktop.

Because this tool is so important it is found in a number of places. After clicking this icon, the Konqueror browser will open with the start of your home directory displayed.

The Desktop sub-directory is created automatically at the same time as the home directory. Files that are saved to this sub-directory will be displayed as icons on the desktop.

The navigation icons are displayed on the left of the toolbar. The Up icon displays the directory one up in the hierarchy. This is also known as the parent of the current directory. It is one step closer to the root of the system.

  • Click Up twice. This will display the root of the system. This is the starting point of the entire directory system.

Although you can see files and directories, you will not be able to manipulate them or delete them. You are only able to work with directories and files to which you have access. Normally these are only files located in your home directory and its sub-directory. The root user is however able to give you access rights to files and directories outside your home directory.

The Back and Forward icons allow you to trace your steps back and forward through the directories you have visited during your current session.

To return to the home directory at any stage, press the Home icon.

To move to a new directory, double click on the icon in the main pane.

  • Double click on the etc directory.

You can also type the name of the directory into the location window if you know its path. Recall that Linux file and directory names are case sensitive.

Create a directory/folder and a further sub-directory/sub-folder

The following example illustrates how to create directories and sub-directories in your home directory.

  1. Click the Home icon.

  2. Edit->New Directory or press F10.

  3. Enter the name for the new directory, Letters.

  4. Click OK.

  5. Edit->New Directory or press F10.

  6. Enter the name for the new directory, Articles.

  7. Double click on the Letters icon in the main pane.

    Notice that the contents of the Location bar now reflect the new directory.

  8. Edit->New Directory or press F10.

  9. Enter a name for the new sub-directory, Jan2004.

  10. In the same way create directories called Feb2004 and Mar2004.

These new directories will be displayed as icons.

You could, if you wish, enter these sub-directories and create another level of sub-directories within each.

  1. Work out a meaningful directory structure for your own needs.

  2. Create this structure using the method that has just been described.

Open a window to display directory/folder name, size, location on drive

Change View Mode

The default view in Konqueror displays only icons. There are other possible views on a directory.

  1. Click on Home and move up to the root level.

  2. View->View Mode->Tree View

    There are a number of different view options.

  3. Click on Home to expand the directory so that its contents will be displayed.

  4. Click on your own home directory.

  5. Click on the Letters sub-directory.

    You should see a display similar to the one on the screen capture.

  6. Click the Home icon.

  7. View->View Mode->->Detailed List View.

    This view will give you the most detailed listing of information on the contents of a directory.

The following screen illustrates a directory containing a number of different types of files.

This screen gives you full information on each file. The first four columns provide the basic information on file name, size, File Type and when the file was last Modified. With regard to the Modified column, it is important that your clock and calendar settings are correct. If not, the information in this column will be useless.

Permissions

The permissions column provides information on access rights to the files and directories. Access rights refer to the permissions users have to perform various actions on files and directories.

Each file has an owner and a group associated with it. A group is a set of users collected together under a single group name. The permissions consists of three sets of three characters. The first three refer to the access rights of the owner, the second three of the group and the third set to all other users.

rwx

means read, write and execute rights.

r-x

means read and execute rights only, not write rights.

r--

means read only rights, not write or execute rights.

--x

means execute rights only, not read or write rights.

---

means no rights at all.

If a file has permissions given by rwxr-xr-- this means that the owner has rwx (read, write and execute) rights, the group has r-x (read and execute only) rights and all other users have r-- (read only) rights.

The owner and group associated with a file or directory are specified in the next two columns.

Owners, groups and permissions can be changed by users who have the necessary access rights to the files or directories.

Link: Linux allows you to create a symbolic link to a file in another directory. The link allows a file to be treated as if it is located in a directory while residing elsewhere. The link column sets out the details of symbolic links when appropriate.

Working with Files

Abstract

Recognize common file types: word processing files, spreadsheet files, database files, presentation files, image files, audio files, video files, compressed files, temporary files.

One way of recognising different types of files is to use the Detailed List View in Konqueror as illustrated in the previous section. Files can also be recognised by the extension on the file name. This is the part of the file name that follows the final period. The following table illustrates some common file names and examples of each.

Extension

Example

Description

sxw

jamaica.sxw

A Writer text file.

sxc

populationSA.sxc

A Calc spreadsheet file.

stw

invoice.stw

A template file that can be used as the basis for creating Writer text files.

sxi

client.sxi

A Impress presentation.

pdf

contract.pdf

A picture document format file. This format allows a file to be sent in a format that can only be read and not edited. To read such a file you would need a pdf reader.

htm, html

index.htm

Htm and html files are files that can be read using a web browser.

txt

notes.txt

A text file containing pure text without any formatting.

rtf

plans.rtf

A rich text format file. This is a format that can be used for exchanging files between different types of system.

doc

jamaica.doc

A Microsoft Word document.

xls

populationSA.xls

A Microsoft Excel spreadsheet file.

ppt, pps

client.ppt

A Microsoft PowerPoint presentation file.

mdb

vendors.mdb

A Microsoft Access database file.

zip

install.zip

A compressed file in zip format.

gz

install.gz

A compressed file in gzip format.

tar

oo-137.i586.tar

A tarball file. tar files are used for creating installation packages.

rpm

00-137.i586.rpm

A Red Hat Package Manager File. rpm files are used for creating installation packages.

png

sky.png

A common format for storing graphic images.

jpg, jpeg

sky.jpg

A common format for storing graphic images.

tif

sky.tif

A common format for storing graphic images.

gif

sky.gif

A common format for storing graphic images.

wav

au

trumpet.wav

trumpet.au

An audio file

An audio file

mpg

avi

concert.mpg

concert.avi

A video file

A video file

tmp

ws0001.tmp

A temporary file

Extensions are a Windows concept and are not actually needed in Linux. They are however useful in providing information for users about the contents or format of files.

Count the number of files, files of a particular type, in a folder (including any files in sub-folders)

Count total number of files and sub-directories in a directory

When you access a directory with Konqueror using icon mode,, the status bar at the bottom indicates the number of files and directories in the current directory.

However, these figures only count what is in the current directory and not what is in the sub-directories.

To get full information on a directory and its sub-directories:

  1. Click Home.

  2. View->View Mode->Tree View

  3. Click on the directory you wish to analyse.

  4. Expand all the sub-directories you wish to include. You will also need to expand sub-directories within these.

This is illustrated on the following screen.

[Note]

The status bar at the bottom summarises what can be seen on the screen. The totals exclude the contents of directories that have not been expanded.

Count files of a particular type

Suppose you wish to find the total number of files ending in doc in the sub-directory Letters in your home directory.

  1. Start Applications->Applications->File Tools->Find Files.

  2. Click the Browse button.

  3. Select the Letters sub-directory and Click OK.

  4. Enter *doc in the Named window.

    This means the files and directories can start with any number of letters but must end with the letters doc. If you had entered *.doc, the files located would end in the last four letter. If, for example, the directory contained a file called mydoc, it would be included in the first count but not the second.

    If you wished to count the number of files and directories starting with the letters le, you would enter le* into the window.

  5. Check Include subdirectories.

  6. Uncheck Case sensitive search.

  7. Click OK.

The files that satisfy the search specification will be displayed together with their location. The status bar at the bottom of the screen will display the count of the files.

Change file status: read-only/locked, read-write

The permissions associated with files and directories in the section called “Open a window to display directory/folder name, size, location on drive”. If you are the owner of a file, you can change these permissions.

Change permissions on a directory

In this example you will create a sub-directory in your home directory called Common. You will then give users access to change the contents of this directory.

  1. Click Home..

  2. Edit->New Directory or press F10.

  3. Create a directory called Common.

  4. Right click on Common and select Properties in the context menu.

  5. Click the Permissions tab.