Thursday, December 22, 2011

How to empty a Unix file system with cat /dev/null command dev null

First take the backup of existing file :

$cp dev_rd.log /sapcd/XVPdev


then empty the file

$cat /dev/null > dev_rd.log

still it was giving error : File exists.

It meant that noclobber option is set so gave command

$cat /dev/null >! dev_rd.log

and it worked

1 comment:

Anonymous said...

Thanks for sharing THE CREATING EXPERTS provide in depth knowledge in SAP BASIS courses

http://thecreatingexperts.com/sap-basis-training-in-chennai/

contact +91-08122241286