A user does a chmod operation on a file. Which of the following is true?
1.The last accessed time of the file is updated
2.The last modification time of the file is updated
3.The last change time of the file is updated
4.None of the mentioned
Any files attribute information is stored in which structure on the disk
1. Inode
2.Data blocks
3.File blocks
4.Directory file
All device files are stored in which directory?
1./etc
2./bin
3./dev
4./usr
Binary or executable files are:
1.Regular files
2.Device files
3.Special files
4.Directory files
Effective group id can be set using following permission
1.0777
2.2666
3.4744
4.1711
Effective user id can be set using following permission
1.0777
2.2666
3.4744
4.1711
Executing the cd .. command when at the root level causes
1.Error message indicating the user cant access beyond the root level
2.Behavior is unix-flavor dependent
3.Results in changing to the home directory
4.Nothing happens
How do you add (append) a file file1 to the example.tar file
1.no you cannot add a file to example.tar
2.tar -cvf example.tar file1
3.tar -rvf file1 example.tar
4.tar -evf file1 example.tar
How do you rename file new to file old ?
1.mv new old
2.move new old
3.cp new old
4.rn new old
How to execute ls command inside a vi editor?
1.!ls
2.ls
3.:!ls
4.we can’t execute
If a file is removed in Unix using rm then
1.The file can be recovered by a normal user
2.The file cannot be recovered by a user
3.The file can be fully recovered provided the sytem is not rebooted
4.The file will be moved to /lost+found directory and can be recovered only by administrator’s intervention
If the umask value is 0002. what will be the permissions of new directory
1.777
2.775
3.774
4.664
If user tries to remove (rm) a readonly file (444 permission), what will happen?
1.The file is removed successfully (and silently)
2.The rm command prompts for a confirmation, the command is successful upon confirmation
3.The rm command prompts for a confirmation, however the operation fails because of insufficient permissions
4.The rm command fails because of insufficient permissions
pwd command displays
1.user password
2.password file content
3.present working directory
4.none of the mentioned
sed is a command typically used for
1.Perform complex calculations
2.Perform FIFO based non-blocking I/O
3.Modify/print selective contents of a file
4.None of the mentioned
srwxr-xrw- is a
1.internet socket file
2.unix domain socket file
3.symbolic link
4.shared file
Sticky bit can be set using following permission
1.777
2.2666
3.4744
4.1711
The command syntax to display the file sample.txt one page at a time is
1.man sample.txt>more
2.cat sample.txt<more
3.cat sample.txt|more
4.none of the mentioned
The directory file contains:
1.File names & File Sizes
2.File names & Inode Numbers
3.File names & Address
4.File names & Permissions
The file permission 764 means:
1.Every one can read, group can execute only and the owner can read and write
2.Every one can read and write, but owner alone can execute
3.Every one can read, group including owner can write, owner alone can execute
4.Every one can read and write and execute
The permission -rwSr–r– represented in octal expression will be
1. 0777
2.2666
3.4744
4.4644
The permission -rwxr-sr– represented in octal expression will be
1.0777
2.2766
3.2744
4.2754
The permission -rwxr-xr-t represented in octal expression will be
1.777
2.1755
3.1754
4.2754
The permission -rwxr–r– represented in octal expression will be
1.777
2.666
3.744
4.711
To open a file file1 with cursor at line number 4
1.vi +num file1
2.vi +set num file1
3.vi + set num file1
4.vi +/se nu file1
What command is used to copy files and directories?
1.copy
2.cp
3.rn
4.cpy
What communication command provides communication to another user logged on by writing to the bottom of their terminal?
1.talk
2.write
3.chat
4.transmit
What is the command to set the execute permissions to all the files and subdirectories within the directory /home/user1/direct
1.chmod –r +x /home/user1/direct
2.chmod –R +x /home/user1/direct
3.chmod –f –r +x /home/user1/direct
4.chmod –F +x /home/user1/direct
When mv f1 f2 is executed which files inode is freed?
1.f1
2.f2
3.new inode will be used
4.no inode is freed
When you use the ln command, which of the following occurs?
1.a file is created that points to an existing file
2.a file is created that is a copy of an existing file
3.a file is moved from one location to another
4.a file is renamed
Which are the two types of device files?
1.Character & Block
2.Character & Socket
3.Block & FIFO
4.Input & output
Which command gives the first byte where the difference is in the file1 & file2?
1.diff
2.cmp
3.comm
4.ls -a
Which command is used to display all the files including hidden files in your current and its subdirectories ?
1.ls –aR
2.ls –a
3.ls –R
4.Is –l
Which command is used to set limits on file size
1.fsize
2.flimit
3.ulimit
4.usize
Which command will you use to see the available routes?
1.show route
2.route status
3.netstat -r
4.none of the mentioned
Which directory contain device special files?
1./etc
2./etc/dev
3./root/bin
4./dev
Which is an example for block special file?
1.Virtual Terminal
2.CD-ROM
3.Terminal
4.Serial modem
Which is an example for character special file?
1.Hard disk
2.CD-ROM
3.Terminal
4.Memory
Which of the following commands can be used to change default permissions for files and directories at the time of creation
1.Chmod
2.Chown
3.Umask
4.Chgrp
Which of the following commands can be used to copy files across systems?
1.ssh
2.telnet
3.rsh
4.ftp
Which of the following commands will allow the user to search contents of a file for a particular pattern
1.touch
2.grep
3.find
4.ls
Which of the following is not a valid file type on Linux
1.Socket
2.Softlink
3.Inode
4.FIFO
Which of the following is not correct statement regarding file types?
1.Hard links share same inode number
2.Soft links cannot be created across partitions
3.Socket files are Unix domain sockets
4.Character file is a special file
Which of the following time stamps need not exist for a file on traditional unix file system
1.Access Time
2.Modification Time
3.Creation Time
4.Change Time
Which one shows the name of the operating system?
1.uname -n
2.uname -r
3.uname -o
4.uname –m
Which option of rmdir command will remove all directories a, b, c if path is a/b/c
1.–b
2.–o
3.–p
4. –t
Which represents the user home directory
1. /
2. .
3...
4. ~
Which screen manipulation command sets the screen back to normal?
1.tput cup
2.tput smso
3.tput rmso
4.tput blink
Which tar command option is used to list the files in a tape archive format?
1.cvf
2.tvf
3.xvf
4.ovf
Write the command to display the current date in the form dd/mm/yyyy.
1.date +%d/%m/%Y
2.date +”%d/%m/%Y”
3.date +/%d/%m/20%y
4.date +”/%d/%m/20%y”