How to truncate a file and disconnect a session !
Dear Friends,
I have two questions : 1) Is it possible to truncate the file content , not to drop the file ? i.e, I want to just delete a file's content only, not to drop the file . 2) I can find the connectd user using command 'w' or 'who' . Now How can I force disconnect a session from the list of 'w'/'who' command ? Waiting for kind reply ... ... |
Code:
1. echo > file1 Quote:
Code:
for i in `ps aux | grep user | grep -v grep | awk '{print $2}'`; do kill -9 $i; done; |
All times are GMT -5. The time now is 08:32 AM. |