User:Amy Suo Wu/scripting
< User:Amy Suo Wu
Revision as of 21:09, 1 November 2010 by Amy Suo Wu (talk | contribs)
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.