Internal Exam – Linux
IIHT DIVISION Marks[25]
1.Fill in the blank with the required permission to complete the statement below. In order to make a script executable in a Linux computer, you must assign the___________ permission to the script file.
execute
read
read & write
write
2.You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. David, a Sales Manager, wants to know the name of the shell that he is currently using. Which of the following commands will he use to accomplish the task?
echo $SHELL
RM $shell
MV $shell
LS $shell
3.Which of the following commands is used to change file access permissions in Linux?
chown
chmod
chperm
chgrp
When you remove a user account from your Linux system, the files and directories of this user may still remain on the system. Which of the following commands can you use to remove all items from your Linux system? Each correct answer represents a complete solution. Choose two.
userdel -r
userdel -f
userdel -h
userdel -c
You work as the Network Administrator for Perfect solutions Inc. The company has a Linux-based Network. You are a root user on the Red Hat operating system. You want to grant ownership of the file foofile to a user John. Which of the following commands should you use to accomplish this task?
chown John foofile
chmod John foofile
chgrp foofile John
chown foofile John
You want to temporarily change your primary group to another group of which you are a member. In this process, a new shell will be created, and when you exit the shell, your previous group will be reinstated. Which of the following commands will you use to accomplish this task?
chmod
newgrp
chgrp
chown
Which of the following commands will you run to do case-sensitive search for files named
foobar.png?
locate -name foobar.png
find -iname foobar.png
grep-name foobar.png
find -name foobar.png
You work as the Network technician for McNeil Inc. The company has a Linux-based Network. You are working on the Red Hat operating system. You want to remove some write protected files and directories. Which of the following commands should you use to accomplish this task?
rm -rf
rm -f
rmdir
rm
You work as the Network Administrator for Tech Perfect Inc. The company has a Linux-based network. You are working as a root user on the Linux operating system. You have created a file in the vim text editor. You want to save this file and exit it. Which of the following keys should you use to accomplish the task?
:w
:wq
:q!
:
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system He wants to change the group membership of the file foo to group bar. Which of the following commands will he use to accomplish the task?
chgrp foo bar
chgroup bar foo
chgrp bar foo
chgroup foo bar
Which of the following cp command parameters copies only when the source file is newer than the destination file or when the destination file is missing?
-u
-l
-p
-s
 
Which shell script is the first startup script run when a login shell is started in Linux?
~/.bashrc
/etc/profile.d
/etc/profile
/etc/bashrc
You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to see all directories and files, including hidden files of your home directory in long listing format. Which of the following command-line utilities would you use to accomplish this task?
ls -al /root
ls
ls -s /root
ls -h /root
You work as the Network Administrator for McNeil Inc. The company has a Linux-based network. You are working a root user on the Red Hat operating system. You want to search for files named snow.html, Snow.html, SNOW.html in the current directory. Which of the following commands should you use to accomplish the task?
find -iname snow.html
find -name snow.html
find name snow.html
find -i snow.html
You are a newly appointed technician for company Inc. The company has Linux- based network. You have executed a command find /home - user joe -group joe on the terminal. What will this command do?
It will search for files owned by the user joe -group joe anywhere on the system.
It will backup files owned by the user joe -group joe in /home/.
It will display the content of a file that belongs to group joe.
It will search for files owned by the user joe -group joe in /home/.
Which of the following commands does not save changes before exiting from the VI editor?
:q!
:q
zz
:w
John is a newly appointed Network technician at McNeil Inc. The company has a Linux-based Network. John is currently working on the /tmp directory. The /tmp directory has a file named file3.txt. John wants to copy this file in a subdirectory named backup of his home directory /home/John. Which of the following commands should John use to accomplish his task? Each correct answer represents a complete solution. Choose three.
cp file3.txt /home/John/backup
cp file3.txt /home/John/backup/
cp file3.txt backup
cp file3.txt ~/backup
You work as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. You want to modify a configuration file in a Linux server. Which of the following utilities will you use to accomplish the task?
vi
nmap
ms word
gzip
You want to repeat the last command you entered in the bash shell. Which of the following commands will you use?
history !#
history !!
history ##
history !1
Which of the following SHELL commands displays currently logged-in users and their tasks?
w
finger
whoami
who
Which command is used for creating an empty file in Linux?
cat
touch
vi
man
Which command will display the full details of the users logged into the Linux system?
who
whoami
wpwd
Which command is used for removing a directory which is not empy?
rm
rm –f
rm –rfrm-p
Which command is used for creating multiple files at a time?
touchvat
vi
mv
Which command is used for renaming a file
rm
cp
mvls

0 comments:

Post a Comment

 
Top