CompTIA
XK0-005 · Question #220
A user issues the following command: ls -l /var/log | egrep -e '^d[rwx]{3}.[rw-]{3}.' The list of files in the system is shown below: Which of the following results matches the command issued?
The correct answer is A. drwxr-x--- 2 root adm 4096 Apr 25 14:41 unattended-upgrades. If the regular expression is as follow: ls -l /var/log | egrep -e '^d[rwx]{3}.[rw-]{3}.'
System Management
Question
A user issues the following command:
ls –l /var/log | egrep –e ‘^d[rwx]{3}.[rw-]{3}.’ The list of files in the system is shown below:
Which of the following results matches the command issued?
Exhibit
Options
- Adrwxr-x--- 2 root adm 4096 Apr 25 14:41 unattended-upgrades
- Bdrwxr-xr-x 2 root root 4096 Apr 24 08:36 apt
- Cdrwxr-xr-x 2 root root 4096 Apr 24 08:36 apt
- D-rw-r--r-- 1 root root 2877 Apr 24 14:14 alternatives.log
How the community answered
(29 responses)- A72% (21)
- B7% (2)
- C14% (4)
- D7% (2)
Explanation
If the regular expression is as follow: ls -l /var/log | egrep -e '^d[rwx]{3}.[rw-]{3}.'
Topics
#Linux Commands#File Permissions#Regular Expressions#Command Piping
Community Discussion
No community discussion yet for this question.
