

MCQOPTIONS
Saved Bookmarks
This section includes 746 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
651. |
Which are the two types of device files? |
A. | Character & Block |
B. | Character & Socket |
C. | Block & FIFO |
D. | Input & output |
Answer» B. Character & Socket | |
652. |
Which of the following is not correct statement regarding file types? |
A. | Hard links share same inode number |
B. | Soft links cannot be created across partitions |
C. | Socket files are Unix domain sockets |
D. | Character file is a special file |
Answer» C. Socket files are Unix domain sockets | |
653. |
Which of the following is not a valid file type on Linux |
A. | Socket |
B. | Softlink |
C. | Inode |
D. | FIFO |
Answer» D. FIFO | |
654. |
Which directory contain device special files? |
A. | /etc |
B. | /etc/dev |
C. | /root/bin |
D. | /dev |
Answer» E. | |
655. |
The directory file contains: |
A. | File names & File Sizes |
B. | File names & Inode Numbers |
C. | File names & Address |
D. | File names & Permissions |
Answer» C. File names & Address | |
656. |
Binary or executable files are: |
A. | Regular files |
B. | Device files |
C. | Special files |
D. | Directory files |
Answer» B. Device files | |
657. |
srwxr-xrw- is a |
A. | internet socket file |
B. | unix domain socket file |
C. | symbolic link |
D. | shared file |
Answer» C. symbolic link | |
658. |
When you use the ln command, which of the following occurs? |
A. | a file is created that points to an existing file |
B. | a file is created that is a copy of an existing file |
C. | a file is moved from one location to another |
D. | a file is renamed |
Answer» B. a file is created that is a copy of an existing file | |
659. |
The soft link will increase the link counter of the file.(T/F) |
A. | true |
B. | False |
Answer» C. | |
660. |
Which of the following statement is true? |
A. | The cp command will preserve the meta data of the file |
B. | The sort command by default sorts in the numeric order |
C. | The mv command will preserve the meta data of the file |
D. | The command ps will display the filesystem usage |
Answer» D. The command ps will display the filesystem usage | |
661. |
Where can I find the printer in the file structure? |
A. | /etc |
B. | /dev |
C. | /lib |
D. | /printer |
Answer» C. /lib | |
662. |
Which command is used to change permissions of files and directories? |
A. | mv |
B. | chgrp |
C. | chmod |
D. | set |
Answer» D. set | |
663. |
Creation of hardlinks that point across partitions |
A. | is allowed only to root user |
B. | can be done by all users |
C. | the effects are unspecified |
D. | is not allowed |
Answer» E. | |
664. |
Deleting a soft-link |
A. | Deletes the destination file |
B. | Deletes both the softlink and the destination file |
C. | Deletes just the softlink |
D. | backup of the destination is automatically created |
Answer» D. backup of the destination is automatically created | |
665. |
If two files on same partition point to the same inode structure they are called |
A. | Soft links |
B. | Hard links |
C. | Alias |
D. | Special files |
Answer» C. Alias | |
666. |
There are two hard links to the “file1” say hl and h2 and a softlink sl. What happens if we deleted the “file1”? |
A. | We will still be able to access the file with hl and h2 but not with sl |
B. | We will not be able to access the file with hl and h2 but with sl |
C. | We will be able to access the file with any of hl, h2 and sl |
D. | We will not be able to access the file with any of hl, h2 and sl |
Answer» B. We will not be able to access the file with hl and h2 but with sl | |
667. |
A user creates a link to a file file1 using the following command “ln file1 file2”. Which of the following is not true? |
A. | file1 and file2 have the same inode numbers |
B. | The number of links for file1 is displayed as 1 |
C. | The number of links for file1 is displayed as 2 |
D. | The number of links for file2 is displayed as 2 |
Answer» C. The number of links for file1 is displayed as 2 | |
668. |
How many links are created when we creat a directory file? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
669. |
By default if any regular file is created, the number of link is displayed as 1 ? |
A. | True |
B. | False |
Answer» B. False | |
670. |
Any file’s attribute information is stored in which structure on the disk |
A. | Inode |
B. | Data blocks |
C. | File blocks |
D. | Directory file |
Answer» B. Data blocks | |
671. |
When mv f1 f2 is executed which file’s inode is freed? |
A. | f1 |
B. | f2 |
C. | new inode will be used |
D. | no inode is freed |
Answer» C. new inode will be used | |
672. |
What command is used to copy files and directories? |
A. | copy |
B. | cp |
C. | rn |
D. | cpy |
Answer» C. rn | |
673. |
How do you rename file “new” to file “old”? |
A. | mv new old |
B. | move new old |
C. | cp new old |
D. | rn new old |
Answer» B. move new old | |
674. |
Executing the ‘cd ..’ command when at the root level causes |
A. | Error message indicating the user can’t access beyond the root level |
B. | Behavior is unix-flavor dependent |
C. | Results in changing to the ‘home’ directory |
D. | Nothing happens |
Answer» E. | |
675. |
If a file is removed in Unix using ‘rm’ then |
A. | The file can be recovered by a normal user |
B. | The file cannot be recovered by a user |
C. | The file can be fully recovered provided the sytem is not rebooted |
D. | The file will be moved to /lost+found directory and can be recovered only by administrator’s intervention |
Answer» C. The file can be fully recovered provided the sytem is not rebooted | |
676. |
Which represents the user home directory |
A. | / |
B. | . |
C. | .. |
D. | ~ |
Answer» E. | |
677. |
Which option of rmdir command will remove all directories a, b, c if path is a/b/c |
A. | –b |
B. | -o |
C. | –p |
D. | –t |
Answer» D. –t | |
678. |
Which command is used to set limits on file size |
A. | fsize |
B. | flimit |
C. | ulimit |
D. | usize |
Answer» D. usize | |
679. |
Which of the following time stamps need not exist for a file on traditional unix file system |
A. | Access Time |
B. | Modification Time |
C. | Creation Time |
D. | Change Time |
Answer» D. Change Time | |
680. |
Which screen manipulation command sets the screen back to normal? |
A. | tput cup |
B. | tput smso |
C. | tput rmso |
D. | tput blink |
Answer» D. tput blink | |
681. |
What communication command provides communication to another user logged on by writing to the bottom of their terminal? |
A. | talk |
B. | write |
C. | chat |
D. | transmit |
Answer» B. write | |
682. |
sed is a command typically used for |
A. | Perform complex calculations |
B. | Perform FIFO based non-blocking I/O |
C. | Modify/print selective contents of a file |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
683. |
To open a file file1 with cursor at line number 4 |
A. | vi +num file1 |
B. | vi +set num file1 |
C. | vi + “set num” file1 |
D. | vi +/se nu file1 |
Answer» B. vi +set num file1 | |
684. |
Which command gives the first byte where the difference is in the file1 & file2? |
A. | diff |
B. | cmp |
C. | comm |
D. | ls -a |
Answer» C. comm | |
685. |
How to execute ls command inside a vi editor? |
A. | !ls |
B. | :ls |
C. | :!ls |
D. | we can’t execute |
Answer» D. we can’t execute | |
686. |
How do you add (append) a file “file1” to the example.tar file |
A. | no you cannot add a file to example.tar |
B. | tar -cvf example.tar file1 |
C. | tar -rvf file1 example.tar |
D. | tar -evf file1 example.tar |
Answer» D. tar -evf file1 example.tar | |
687. |
Which one shows the name of the operating system? |
A. | uname -n |
B. | uname -r |
C. | uname -o |
D. | uname –m |
Answer» D. uname –m | |
688. |
Write the command to display the current date in the form dd/mm/yyyy. |
A. | date +%d/%m/%Y |
B. | date +”%d/%m/%Y” |
C. | date +/%d/%m/20%y |
D. | date +”/%d/%m/20%y” |
Answer» B. date +”%d/%m/%Y” | |
689. |
Which tar command option is used to list the files in a tape archive format? |
A. | cvf |
B. | tvf |
C. | xvf |
D. | ovf |
Answer» C. xvf | |
690. |
Which of the following commands can be used to change default permissions for files and directories at the time of creation |
A. | Chmod |
B. | Chown |
C. | Umask |
D. | Chgrp |
Answer» D. Chgrp | |
691. |
pwd command displays |
A. | user password |
B. | password file content |
C. | present working directory |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
692. |
Which of the following commands can be used to copy files across systems? |
A. | ssh |
B. | telnet |
C. | rsh |
D. | ftp |
Answer» E. | |
693. |
Which command is used to display all the files including hidden files in your current and its subdirectories ? |
A. | ls –aR |
B. | ls –a |
C. | ls –R |
D. | ls –l |
Answer» B. ls –a | |
694. |
Which of the following command output contains userid? |
A. | ls |
B. | help |
C. | date |
D. | ls –l |
Answer» E. | |
695. |
Which commands will give you information about how much disk space each file in the current directory uses? |
A. | ls -l |
B. | ls -la |
C. | du |
D. | ls -a |
Answer» D. ls -a | |
696. |
Which of these commands could you use to show one page of output at a time? |
A. | less |
B. | sed |
C. | pause |
D. | grep |
Answer» B. sed | |
697. |
Command used to count number of character in a file is |
A. | grep |
B. | wc |
C. | count |
D. | cut |
Answer» C. count | |
698. |
Command used to determine the path of an executable file is |
A. | which |
B. | where |
C. | wexec |
D. | what |
Answer» B. where | |
699. |
Which command is used to identify file type? |
A. | Type |
B. | File |
C. | Finfo |
D. | Info |
Answer» E. | |
700. |
Which option of rm command is used to remove a directory with all its subdirectories |
A. | -b |
B. | -o |
C. | -p |
D. | -r |
Answer» E. | |