Shell Scripting with Linux/Unix ( Part 2)

Welcome back, this week we will try to cover few more basic commands that are used commonly on the linux shell.




1) Steps for installing firestarter (fire wall) on Ubuntu 5.10   

2) Shell Scripting with Linux/Unix  ( Part 1)

3) Mathematical Software ( Plotting 2- D graphs in Mathcad)

4) Probability and Random Processes course problems.

5) Fun With Pointers in C++

6) Explicit and Implicit DLL Linking

7) VirtualFunctions C++

8) CS8803 AIA @ Georgia Institute of Technology

9) CS 8803 AIA Paper 2Title: Sleepers and Workaholics: Caching Strategies in Mobile Environments.

 10) AIA Week 5

11) AIA Week 6

12) CS 8803 Week 3 Paper Critque

13) Computer Security ( Bell LaPadula Model)

$ echo my name is zinedine zidane

the echo command simply outputs the text that appears after the command. In the above example the output is:

my name is zinedine zidane

Working with files.

$ ls

will display the files that are stored in the current working directory.

$ cat 'filename'

filename is the file which contents you wish to examine.

$ wc 'filename'

filename is the file for which the number of lines, words and characters are displayed.  

flags can be used along with the commands. For a more detailed examples and use of flags please type man 'command' on your linux shell. Example:

$ wc -l 'filename'

The use of the -l flag with the wc command displays only the number of lines in the file.

$ wc -c 'filename'

The use of the -c flag with the wc command displays only the number of characters in the file.

$ wc -w 'filename'

The use of the -w flag with the wc command displays only the number of words in the file.

$ cp source_filename destination_filename

The first argument to the cp command is the source file name and the second argument is the destination file name.

$ mv file_to_be_renamed new_name_of_the_file

Here the first argument to the mv command is the file name of the file that needs to be changed. The second argument is the new file name.

$ rm 'filename'

The rm command simply removes the file.

Working with directory:

Unix has a special directory called the root denoted by '/' this is the parent directory and all other directory are created child, grand children and so on, to the root directory.

$ pwd

displays the current working directory.

$ cd 'directory name'

 changes your working directory

$ cd ..

to go one level up in your directory hierarchy.

$ cd ../..

to go two levels up in your directory hierarchy.

$ ls 'directory_name'

will display the contents of the directory.