pipe commands questions in Linux: 1. Write a piped set of commands using only ls
ID: 3890998 • Letter: P
Question
pipe commands questions in Linux:
1. Write a piped set of commands using only ls -l and egrep to find the number of files in /dev that are character-type (character-type files have use the letter c for type instead of – for regular files or d for directories).
2. Write a piped set of commands to find all devices in /dev that are group writable but not group readable.
3. Write a piped set of commands to find all running processes whose owner is neither root nor Student.
4. Write a piped set of commands to find all files in /proc whose names are exactly 4-digit numbers (no 5-digit numbers).
Explanation / Answer
1) ls -l /dev | egrep "^c" | wc -l
Explanation:
Note: /dev is the location of special or device files in a machine.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.