common unix commands used Ver 2

  • malai
  • malai's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
17 years 4 months ago #2287 by malai
common unix commands used Ver 2 was created by malai
To send email with attachment in AIX.



uuencode /tmp/myfile.txt myfile.txt | mailx -s 'myfile' -n 'This email address is being protected from spambots. You need JavaScript enabled to view it.'






Keep posting and make this community active|Thanks

Please Log in or Create an account to join the conversation.

More
17 years 4 months ago #2288 by eb.phantom
Replied by eb.phantom on topic Redirect LIST output
To redirect the LIST output to a file.



$ LIST FBNK.SECTOR (N >out.txt



EB.PHANTOM

Please Log in or Create an account to join the conversation.

More
17 years 4 months ago #2289 by ronk
Replied by ronk on topic Archiving COMO files
## Create an archive directory



mkdir /T24basedir/old_COMO_logs/yoursystem_COMO_20`date +%y%m%d`



## Find the old COMO files and move to archive directory



find /T24basedir/yoursystem/bnk/bnk.run/&COMO& -type f -mtime +1 -prune -exec mv {} /T24basedir/old_COMO_logs/yoursystem_COMO_20`date +%y%m%d` ;



## Create .tar.gz file of archive directory



tar cf - /T24basedir/old_COMO_logs/yoursystem_COMO_20`date +%y%m%d` | gzip -c > /T24basedir/old_COMO_logs/yoursystem_COMO_20`date +%y%m%d`.tar.gz



## Remove archive directory



rm -rf /T24basedir/old_COMO_logs/yoursystem_COMO_20`date +%y%m%d`

Please Log in or Create an account to join the conversation.

  • malai
  • malai's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
17 years 2 months ago #2290 by malai
Replied by malai on topic target directory
To extract your compressed tar file into another directory.



zcat tarfile.tar.Z | (cd targetfolder; tar xf - )


___________

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds