• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

10 Cards in this Set

  • Front
  • Back
Grep recursively:
find . | xargs grep -i PRICING_PRICE_TYPE
Grep for more than one word:
grep -i 'vcmilogin\|vcmilogout' PSH_27-06.11.log |grep -i U370582
Grep for two words that need to be returned:
less *.log |grep word1 | grep word2
Find file name:
find . -name 'upgrade*'
AWK:
$ ps auwx | awk ‘{print $1,$11}’
less maapi.log |grep -i TRADING-BOOK-NAME | awk '{print $25}' > /tmp/bookname.txt
GREP:
grep -l ‘redeem reward’ /path
gives just the file names and -lr would do it recursively

If you want to find the exact string use the -w option.
for Example to find the whole word “Redeem Reward”,
grep -H -r -w “Redeem Reward” /

Use grep to search 2 different words
use egrep as follows:
$ egrep -w 'word1|word2' /path/to/file

The grep command supports regular expression pattern. To search multiple words, use following syntax:
grep 'word1|word2|word3' /path/to/file
In this example, search warning, error, and critical words in a text log file called /var/log/messages, enter:
$ grep 'warning|error|critical' /var/log/messages
To just match words, add -w swith:
$ grep -w 'warning|error|critical' /var/log/messages

grep -A 1 - will give you one line after your search results
grep -B 1 - will give you one line before your results search
grep -C 1 - will give you one line before and after your search results.
Head
head is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is:

head [options] <file_name>
Less
LESS:
h - help
m - followed by a lower case letter marks the current position
' - followeb by a lower case letter returns to the position with that mark
f - forward one window
b - backward one window
g - top of file
uname
uname
Print system information, print information about the machine and operating system it is run on. If no options are given, `uname' acts as if the `-s' option were given.
-a
--all
Print all of the below information.

-m
--machine
Print the machine (hardware) type.

-n
--nodename
Print the machine's network node hostname.

-p
--processor
Print the machine's processor type

-r
--kernel-release
Print the kernel release

-s
--kernel-name
Print the kernel name

-v
--kernel-version
Print the kernel version

-i
--hardware-platform
Print the hardware platform or "unknown"

-o
--operating-system
Print the operating system
gzip
usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
-c --stdout write on standard output, keep original files unchanged
-d --decompress decompress
-f --force force overwrite of output file and compress links
-h --help give this help
-l --list list compressed file contents
-L --license display software license
-n --no-name do not save or restore the original name and time stamp
-N --name save or restore the original name and time stamp
-q --quiet suppress all warnings
-r --recursive operate recursively on directories
-S .suf --suffix .suf use suffix .suf on compressed files
-t --test test compressed file integrity
-v --verbose verbose mode
-V --version display version number
-1 --fast compress faster
-9 --best compress better
--rsyncable Make rsync-friendly archive
file... files to (de)compress. If none given, use standard input.

gzip -1 k.log
uuencode k.log.gz k.log.gz |mail albert.barette@jpmorgan.com