To count how many times each IP address appears in ips.txt, an administrator runs sort ips.txt | uniq -c. Why is sort needed first?
Pour compter combien de fois chaque adresse IP apparaît dans ips.txt, un administrateur lance sort ips.txt | uniq -c. Pourquoi sort est-il nécessaire d'abord ?
Answers
Auniq only works on files that are smaller than one megabyteuniq ne fonctionne que sur des fichiers de moins d'un mégaoctet
Buniq only merges duplicate lines that are next to each otheruniq ne fusionne que les lignes identiques qui se suivent
Csort removes the blank lines that uniq cannot readsort supprime les lignes vides que uniq ne sait pas lire
DIt is not needed; the output is identical either wayIl n'est pas nécessaire ; le résultat est identique dans les deux cas
The answer and explanation are in the full bank.
This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.
Unlock for 5,000 RWFMIFOTRA exam practicealigned to Practice set: Linux and CMD Commands·3 marks·Hard
More Operating Systems questions
- You need to print the whole contents of a file. Which command does that?
- What does the Linux command `uname` do?
- What does the Linux command `chmod` do?
- On a Linux system, what does /boot contain?
- What does the Linux command `ping` do?
- What does the Linux command `ps` do?
- What does the Linux command `tar` do?
- You need to search a directory tree for files matching criteria. Which command does that?