github

Made bySaurav Hathi

CSE - Mock Test - 15

Q1:

What is the output of the following code:

os=Unix

echo 1.$os 2."$os" 3.'$os' 4.$os

Tags:
Section:
Linux
Options:
Q2:

which of these is NOT a valid variable in bash

Tags:
Section:
Linux
Options:
Q3:

What would be the current working directory at the end of the following command sequence?

$ pwd

/home/user1/proj

$ cd  src

$ cd  generic

$ cd  .

$ pwd

Tags:
Section:
Linux
Options:
Q4:

What will be output of following command:

$ echo "The process id is" $$$$

Tags:
Section:
Linux
Options:
Q5:

‘kill %s’ command will

Tags:
Section:
Linux
Options:
Q6:

One of the entry of /etc/passwd file is shown below:

user1:x:1111:2222:Sanfoundry:/home/user1:/bin/bash

Which among the following will print userid and home dir in the following pattern “user1:/home/user1”

Tags:
Section:
Linux
Options:
Q7:

How do you remove duplicate lines from the file foo using uniq?

Tags:
Section:
Linux
Options:
Q8:

The permission -rwxr-xr-t represented in octal expression will be

Tags:
Section:
Linux
Options:
Q9:

Sticky bit can be set using following permission

Tags:
Section:
Linux
Options:
Q10:

What is the command to set the execute permissions to all the files and subdirectories within the directory /home/user1/direct

Tags:
Section:
Linux
Options:
Q11:

If the umask value is 0002. what will be the permissions of new directory

Tags:
Section:
Linux
Options:
Q12:

A user does a chmod operation on a file. Which of the following is true?

Tags:
Section:
Linux
Options:
Q13:

If user tries to remove (rm) a readonly file (444 permission), what will happen?

Tags:
Section:
Linux
Options:
Q14:

To open a file file1 with cursor at line number 4

Tags:
Section:
Linux
Options:
Q15:

Which command gives the first byte where the difference is in the file1 & file2?

Tags:
Section:
Linux
Options:
Q16:

Which is the core of the operating system?

Tags:
Section:
Linux
Options:
Q17:

What command is used to copy files and directories?

Tags:
Section:
Linux
Options:
Q18:

How do you rename file “new” to file “old”?

Tags:
Section:
Linux
Options:
Q19:

Executing the ‘cd ..’ command when at the root level causes

Tags:
Section:
Linux
Options:
Q20:

How to execute ls command inside a vi editor?

Tags:
Section:
Linux
Options: