User:Amy Suo Wu/scripting: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 6: Line 6:
======Decide whether the following sentence is true or false: ======
======Decide whether the following sentence is true or false: ======


1. Linux is a collection of programs and utilities glued together by the bash shell. T
  1. Linux is a collection of programs and utilities glued together by the bash shell. T
2. Shell manages files and data. F
  2. Shell manages files and data. F
3. Shell manages networks, memory and other resources. F
  3. Shell manages networks, memory and other resources. F
4. Linux kernel runs programs and loads them into the memory. T
  4. Linux kernel runs programs and loads them into the memory. T
5. Bash shell is a poor user interface.  
  5. Bash shell is a poor user interface. F
6. Bourne Shell is also known as /bin/sh. T
  6. Bourne Shell is also known as /bin/sh. T
7. Bash Shell is also known as /bin/bash or /usr/local/bin/bash. T
  7. Bash Shell is also known as /bin/bash or /usr/local/bin/bash. T
8. C Shell offers more C like syntax. T
  8. C Shell offers more C like syntax. T
9. A few commands are built into the shell. T
  9. A few commands are built into the shell. T
10. Linux file system organised as hierarchy. F
  10. Linux file system organised as hierarchy. F
11. To refer to several files with similar names you need to use wildcards. T
  11. To refer to several files with similar names you need to use wildcards. T
12. Wildcards increase command typing time. F
  12. Wildcards increase command typing time. F
13. Command ls is used to list directories. T
  13. Command ls is used to list directories. T
14. rmdir command will only remove empty directories. T
  14. rmdir command will only remove empty directories. T
15. Everything is file in Linux. T
  15. Everything is file in Linux. T
16. rm -i filename command will prompts for confirmation.
  16. rm -i filename command will prompts for confirmation.
17. Linux can run many programs at the same time. T
  17. Linux can run many programs at the same time. T
18. The bash shell is just a program. T
  18. The bash shell is just a program. T


* Write a command names, which can display the files to the terminal. ls
* Write a command names, which can display the files to the terminal. ls

Revision as of 22:09, 1 November 2010

Chapter 1

What is the shell?

Accepts and translates human readable comments to computer language (something the kernel can read and process).

Decide whether the following sentence is true or false:
  1. Linux is a collection of programs and utilities glued together by the bash shell. T
  2. Shell manages files and data. F
  3. Shell manages networks, memory and other resources. F
  4. Linux kernel runs programs and loads them into the memory. T
  5. Bash shell is a poor user interface. F
  6. Bourne Shell is also known as /bin/sh. T
  7. Bash Shell is also known as /bin/bash or /usr/local/bin/bash. T
  8. C Shell offers more C like syntax. T
  9. A few commands are built into the shell. T
 10. Linux file system organised as hierarchy. F
 11. To refer to several files with similar names you need to use wildcards. T
 12. Wildcards increase command typing time. F
 13. Command ls is used to list directories. T
 14. rmdir command will only remove empty directories. T
 15. Everything is file in Linux. T
 16. rm -i filename command will prompts for confirmation.
 17. Linux can run many programs at the same time. T
 18. The bash shell is just a program. T
  • Write a command names, which can display the files to the terminal. ls
  • Write a command to list details of all files ending in '.perl' in reverse time order. ls -R
  • Write a command to list your running programs. ps
  • Write a command to list files waiting to be printed.
  • Write a command to delete 3 files called file1.txt, file2.txt, and data1.txt. rmdir file.txt, file2.txt, data1.txt
  • Write a command to creates a new sub-directory called 'foo' in /tmp.
   * Write a command to delete the directory called 'foo'. rm foo
   * Write a command to read all ls command options.