Thursday, July 16, 2015

linux delete command from history

### histcontrol used to exclude commands from history: 
### add space before commands to exclude from history:




$HISTCONTROL=ignorespace

$ history -d 29



Note: the second command has a space preceded.

Wednesday, July 15, 2015

Linux delete millions of files - Argument list too long error [tested]

"Argument list too long" error


below command worked: [tested] 

find . -name "*.aud" -type f -print -delete


find /app/rdbms/audit/ -name "*.aud" -type f -print -delete

Or


Using For loop: (time consuming..)

for f in *.aud; do rm "$f"; done

Note: To improve performance, remove "-print"