How would you truncate a log file that is growing too large
if you don't have space to compress it or to move it
somewhere else? How would you do it?

Answer Posted / bipin bapurao sautadekar

more two commands to truncate the file.

# cat /dev/null > filename
# cat > filename and then press ctrl+c

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

There are two nic cards on a sun server. I need to connect one nic to pupic ip and another nic to DMZ. Could you tell me how to configure step by step?

2215


How to create core dump and crash dump #coreadm .

2608


What does pkgadd command do?

869


How can u find a file which is logged in last week?

2406


How to make SUN server as router in subnetwork?

2324


what is the difference between solaris8 and solaris9 and solaris10

5071


Which command is used to backup and restore solaris file system?

767


Where do you get Alarm prompt?

2480


Hi We have upgraded our sun machine from solaris 9 to solaris 10. Before upgradation the date command output(Solaris 9) Wed Oct 13 09:45:21 IST 2010 But after upgradation the output for date is as below(solaris 10). Wednesday, October 13, 2010 9:46:14 AM IST Looks like I need to change LC_TIME=C. can you please help me how to change it for permanently

1978


How to add a new LUN in exit disksets (metasets) in solaris please answer me step by step procedure?

3642


please post step by step installation of packages from the EIS cd..

2012


What are the differences between the command line and graphical user interface?

828


what are the alarms in solaris?

2887


How to configure email notification in solaris 8? We are using netbackup 5

3127


After first installation of Solaris 10, what and all the Securities We need to set and how ?

2033