CHAPTER TEN: ANALYZING FILES Flashcards
(17 cards)
command: diff
it tells you what is different between to files.
command: du
disk storage. to see how many bytes a file takes.
command: du-h dir1
show in human readable form
command: wc -i facts.txt
wc = word count, can tell you lines
command: wc -w facts.txt
counts words
command: wc -c facts.txt
counts characters/bytes
command: wc facts.txt
counts words, lines and characters/bytes
what is ASCII?
American standard code for information interchange. it is a code representing 128 English characters as numbers, with each letter assigned a number for 0 - 127
Command: sort facts.txt
sort aphabetically
command: sort -r facts.txt
reverse order
command: sort -n numbers.txt
sort numerically
Command sed
used to find and replace words in text
Command awk
awk is a mini-programming language that is smarter than cut. used to analyse and processes text.
[abc]
matches a b or c
[!abc}
matches anything but a b or c
[[:class:]]
matches a character class like digits or letters
Sudo
it temporarily gives selected users permissions to run specific commands like they were a root