MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following commands is used to display file attributes
A
cat
B
ls-l
C
mkdir
D
ls
Explanation: 

Detailed explanation-1: -Which command is used to list the attributes of a file? Explanation: ls command is used for listing the attributes of a file or directory. ls command when used with-l displays all the seven attributes of a file.

Detailed explanation-2: -The “ls-l” option displays the contents of the current directory in a long listing format, one per line. The line begin with the file or directory permission, owner and group name, file size, created/modified date and time, file/folder name as some of the attributes.

Detailed explanation-3: -ls lists files and directories. If the pathname is a file, ls displays information about the file according to the requested options. If it is a directory, ls displays information about the files and subdirectories therein. You can get information about a directory itself using the-d option.

Detailed explanation-4: -In Linux, the ls command is one of the fundamental tools. It lists files and directories with or without various additional information.

There is 1 question to complete.