Basic Unix shell script Test

Source: Internet
Author: User

Basic Unix shell script Test
1. Which of the following code lines will print your previous working directory to the screen? C
A. Echo ~
B. Echo $ pwd
C. Echo ~ -
D. Echo *
2. Which of the following symbols can be used to redirect the command output to a file? If the file exists, the file will be overwritten? C
A.>
B. <-
C.>
D. n>
3. Which of the following statements enables shell to run the pkgsetup script at pm on April 9, January 10? C
A. pkgsetup at PM Jan 10
B. cron pkgsetup PM Jan 10
C. At PM Jan 10 pkgsetup
D. Batch 5: 30 pm Jan 10 pkgsetup
4. Which of the following replacement symbols will return the path of your previous working directory? A
A ,~ -
B ,??
C ,*
D, $ ()
5. What operations does the following code perform? Ls catalog & sort catalog
A. If the directory file exists, run the sort command.
B. If the directory file does not exist, run the sort command.
C. Run the LS and sort commands in the background.
D. Run the LS and sort commands in subshell.
6. Which of the following symbols can be used as the command separator? B
A ,/
B ,;
C ,/
D ,?
7. Which of the following code statements can be executed by the Creator and users in the same group of pkgsetup scripts, but cannot be viewed by all other users? C
A. chmod + x-o pkgsetup
B. chmod 775 pkgsetup
C. chmod 770 pkgsetup
D. chmod XX-pkgsetup
8. Which of the following code lines will run the script named myscript. Sh in the background? C
A./background/myscript. Sh
B../myscript. Sh &&
C,./myscript. Sh &
D../myscript. Sh background
9. Which type of brackets can you use to enclose commands when executing command replacement? A
A ,()
B. []
C ,{}
D. <>
10. Which of the following shells do not support editing command lines in VI and Emacs modes? B
A, TC
B. Bourne
C. Bash
D. Korn

Your score for this test is correct for 10 questions. Pass the test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.