Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

2014/04/15

How to get disk space in UNIX? (UNIX)

Usage:
df -k | grep local

Enjoy!

How to find a specific string in UNIX? (UNIX)

find . -type f -exec grep -l "STRING_YOU_ARE_LOOKING" {} \; >> /var/tmp/user_temp/tracersearch/tracer_base_profl_search.log &

Enjoy!

How to look up file in UNIX? (UNIX)

If you know the file name, the below command will help you to find out a file.

Please notice that the "." means look through everything in the location where you are.

find . -type f -print | grep 'actionfile_inq.xml'

Enjoy.

How to look up a file in a directory? (UNIX)

In the below example:
CCY_EMU_EXT = filename (it will look up files CCY_EMU_EXT and more CCY_EMU_EXTx, where x can be anything with unlimited number of characters)

After the ">" symbol is the path where you want the result to print it to.  CCY_EMU_EXT_1.log is the result file.

find /gtsallsrv/gts/ -name "*" | xargs grep -l CCY_EMU_EXT  > /var/tmp/v439333/CCY_EMU_EXT_1.log &

How do you look up a process in UNIX? (UNIX)

How do you grep a process?  And what is grep?  grep is actually a function to "grab" the process of a specific name in unix.  It helps you to identify which process is actually running on background.

/usr/ucb/ps -auxww | grep -i qm | grep -i GTSD25QM

-i = ignore letter case

Enjoy.