Small Unix Tips


To find contact_opt_out recrsively inside the directory

find . | xargs grep -s OMNI_Balbao_Loads.par


~~

date + "%y-%m-%d"

~~

to manipulate string in command use brackets preceeded by dollar sign

eg: mv filename $(echo filename|cut c-2-100)

renames file from fielname to ilename ( because of cut command)

~~

To ridrect error commands use

2> or >&

eg
sh script.sh 2>errorfile
,sh script.sh >& errorfile


~~

To check space

du -sh
df /foldername
df -h

~~

Comments

Popular posts from this blog

The Secret behind A B I N I T I O.

Finding Skewed Tables in Teradata

Macro to generate Mload Script