1. In unix $ indicates
ans: total no of parameters
2. What is the o/p of
for x in ‘ls
do
chmod u = rwx $x
done
ans: change permissions of files in PWD as rwx for users
3. ------ command writes to force a message on all users terminals
ans: WALL
4. The commands to merge lines of files
ans: Paste
5. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2.
6. ----------- command is used to create links.
Ans: ln
7. File descriptor for standard output
Ans: 1
8. The command used to remove successive empty lines from the given file is
Ans : uniq
9. command to see the processes running on a particular terminal
Ans: ps –t term
10. In vi editor the command to search forward in the buffer for the next occurrence of the pattern of text. Ans : /pattern
11. The command to add two floating point shell variables a and b
Ans: ’expr $a +$b | bc ‘
12. The command to know the value of your current shell
ans :$echo $$
13. -------- represent the default clause of the case control instruction
ans: %
14. The variables declared can be exported to
ans: new shell
15. $PS1=”JNTU” after execution of it , every time the system prompts it displays
ans: JNTU
16.The------- utility compares contents of the two files
ans: diff
17. hidden files in unix always begin with a character-----
ans: dot
18. The text manipulating utility is
ans: awk
19. cat file1> file2
ans:overwrite file2 with file1
20.--------------- is a filename substitution metacharacter . Ans: [...]
21. The command to merge lines of files.
Ans : paste
22. cat file1>> file2
Ans: CONTENTS OF FILE1 ARE APPENDED TO FILE2
23. The metacharacter which gives the shell a choice of any one character except those enclosed in the list.
Ans: [!...]
24. The command to subtract two floating point shell variables a and b.
ans : ‘expr $a-$b’ | bc
25. The command to give all permissions to user,group,others.
Ans: chmod 777 file
26. In --------- you can move commands from foreground execution to background execution as required.
Ans: C shell
27. The out put of the script
cout=1
while[$cout –le 10]
do
echo $count
done
Ans: infinite loop
28. the parent of the login shell------
ans: init
29. the command to list all files whose name start with a vowel is ..
ans: $ls [aeiou]*
30.--------command is not allowed within a variable name.
ans: more
31. ------symbol is not allowed within a vriable name.
ans: comma
32. -------describe the state of the file system how large it is, how many maximum files can it accommodate,
how many files can be created.
Ans: super block
33. User id of user is stored in ----- file
ans: /etc/password
34. the command to find the modulus of two variables a & b
ans: expr $a%$b
35. “$uniq –D xyz”
ans: only prints all duplicate lines
36. The default value of unix -defined variable PS2 is
ans: >>
37. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
38. ----- represent default clause of the case control instruction
ans: *>
39. The file containing startup instruction for your account
ans: .profile
40. ---- operator is used to make file the standard out put , appending to it if it already exists
ans: >>
41. the command to load file XYZ place the cursor on the 100th line in the file
ans:$vi + 100XYZ
42. the----utility compares contents of the two directories
ans: diff
43. the variable declared can be exported to
ans: New shell
44.the command to unmount the systems
ans: umount
45. the command to print number of lines in a file.
Ans: nl
46. The command to display the value of the variable a is
ans: echo a
47. The command to know the value of your current shell
ans :$echo $$
48. First time after editing shell script, user has to give------ permissions to the file
ans: execute permissions to user
49. The tool to join commands together is –
ans: pipe
50.-----------command writes force a message to on all users terminals
ans: wall
51. “$ cmd1 | cmd2”
Ans: makes standard output of cmd1 the standard input of cmd2
52.---- the command is used join a group of files and prepares a archeve file
ans: tar
53. what is the out put of
for x in .
do
ls $x
done
ans: list all file names in present working directory
54. shell metacharacters are also called as
ans: regular expression
55. the desicion making statement offered by born shell
ans: if – then-else-if
56. “$cut -c3-5 xyz
ans : displays third to fifth character of each line from XYZ
57. ‘$ touch sample’, after execution of the command ,the size of the file named sample is-----
ans: zero bytes
58.unix command to rename a file is ----
ans: mv
59.”$cat
ans:take input from the file aa and writes its out put file aa
60.the command to find the division of two floating point shell variables a and b
ans: expr $a/$b | bc
61. the best command to create several empty files quickly is ------
ans: touch
62.$ who | sort
ans: the out put of who on the screen is piped to sort
63.”$ uniq –d” file
ans: only prints all duplicate lines
64.the decision making statement offered by bourne shell
ans: if- then –fi
65.the vi editor, scroll, one page is
ans: at command used control f
66.---- operator is used to make a file the standard out put ,appending if it
already exists.
Ans: >>