Unix file system search string
------------------------------
find . -type f -print | xargs grep -l "WORD" 2>/dev/null
find . -exec grep "tar_id" '{}' \; -print > /exp/home/test.txt
How to count word in a file?
---------------------------
grep 'word' test.txt | wc -l
To create link file
-------------------
ln -s path program name
Example : ln -s /fnd/11.5.0/bin/fndcpesr $AP_TOP/bin/INVOUT
To check Concurrent Manager Running or not
------------------------------------------
ps -ef |grep FNDLIBR
To find a version of Form or Report
-----------------------------------
strings -a 'REPORT.rdf'|grep Header
To find version
===============/apps/applmgr/product/dev/devappl/ar/11.5.0/lib
adident Header test.o
adident Header filename
To Search string in some directory
----------------------------------
grep -il 'temp' *
To cancel print jobs
--------------------
cancel printer name job number
vi editor
---------
:q! --> quit without saving
:wq! --> quit with saving
:w! --> save
esc i --> for insert
esc x --> for delete
HLK --> for moving up down across
cat command
-----------
To merely display the contents of a file containing ASCII text
Example cat test.sql
To send output to another file.
cat test.sql > test1.sql
The system creates the file test1.sql if it doesn't exist, if it does exist, cat will overwrite the file with the new data-once again.
You can also use cat to create ASCII files if you are not inclined toward using a text editor.
cat > test
creates a file named test and sends output from your keyboard into that file.there are a few rules to follow
*At the end of every line,hit the ENTER key.
*You can use Backspace, no ups and down keys.
*when you are finished typing into the file, type Ctrl-D
You can also use cat to add data to the end of an existing file,use the following
cat >> test
Mailx attachment syntex
-----------------------
mailx -s "Test Subject" ksat@mail.com < test.txt
Return Code
-----------
$? will return 0,if command success. will return 1,if command failed
rm command
----------
rm -f Removes files without verifying action with user
rm -i Removes files after verification from user
Sunday, May 25, 2008
Unix
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment