Unix Miscellaneous Commands | 10 Useful UNIX commands


Unix Miscellaneous Commands  | 10 Useful UNIX commands





For Class Notes:
Unix  Commands and Use Cases-


1. tar command  what is it , why we use it

tar <options> <archivename> <files to be archived>

tar -xzvf myfiles.tar.gz

tar -xzvf myfiles.tar.gz -C /dir/test

tar -tvf myfiles.tar.gz

tar -czvf myfiles.tar.gz /dir/test2



2. source command

source abc.ksh


3. mount command

 
4. split


split -l 200 myfile datapunit

datapunita  datapunitb  datapunitc datapunitd datapunite

split -b 200k myfile datapundit
datapunita  datapunitb  datapunitc datapunitd datapunite

5. df /du

df 

mounted on , size in blocks , free , used ,

df --total


du -d 1 /home/mandeep/test

du -c -h /home/mandeep/test

du -a -h /home/mandeep/test


6. sed '/exit/d' filename.txt


7. sed '2,$ s/unix/linux/' geekfile.txt


8. awk '/UUID/ {print $0}' /etc/fstab


9. finger David

cat emailist.txt 
a@gmai.com
b@datapunit.org.in

10. echo -e "Hi There, \n Please Find the attached cash transaction 
report for year$year. \n\n Thanks 
\n DataPundit | mailx -s "Cash Tran Report" -a 
"$DIR/cash_transaction_$year.xml" $emaillist



11.  head -1 file.txt | od -c

12. sed -i "23456d;23567d;5468d" file.txt  ( sed to remove multiple record from the file)

Fore more Abinitio, AWS and data engineering videos please subscribe , view , like and share my YouTube channel 

Click DataPundit

Comments

Popular posts from this blog

Abinitio Interview Question # 1 - Write Multiple Files in Abinitio

Next In Sequence in ABinitio | How next_in_sequence() works in MFS