Interview Prep/Linux/Packages, Shell & Text Tools

What do cut, sort, uniq, wc, tr, and xargs do?

BeginnerConceptPackages, Shell & Text Tools
Answer
cut -d: -f1,7 /etc/passwd      # fields by delimiter
sort -k2 -n -r file            # numeric reverse on column 2
sort | uniq -c                 # count duplicates (uniq needs sorted input)
wc -l file                     # line count
tr 'a-z' 'A-Z'; tr -d '\r'     # translate or delete chars
find . -name '*.tmp' -print0 | xargs -0 rm -f   # safe with spaces
All Linux questions Roadmap: Linux

More on Packages, Shell & Text Tools