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?

Answers were Sorted based on User's Feedback



How would you truncate a log file that is growing too large if you don't have space to compre..

Answer / 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

How would you truncate a log file that is growing too large if you don't have space to compre..

Answer / syed

Why not you try by using below command

> <file name>

Is This Answer Correct ?    10 Yes 2 No

How would you truncate a log file that is growing too large if you don't have space to compre..

Answer / chris lowder

cp /dev/null <File Name>

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More Solaris Commands Interview Questions

How to change rsc ip in sun V490?

4 Answers   Wipro,


Have you done the patching, the patching is done by you only or some one will assign to you?

0 Answers   HP,


what are the alarms in solaris?

0 Answers  


Disaster recovery steps if OS corrupted

3 Answers  


What is different between crontab and at command?

1 Answers  






Which file to be configuring the logs messages (like: /var/adm/message etc…)

1 Answers  


What is encapsulation?

3 Answers  


How can you create mount points in solaris?

11 Answers   Huawei,


What is default permission of /etc/passwd , /etc/shadow files

7 Answers   Accel Frontline,


How to start / stop the nfs server

2 Answers  


What are configuration files and to configure it in VCS

2 Answers  


How to create swap file

1 Answers  


Categories
  • Solaris Commands Interview Questions Solaris Commands (360)
  • Solaris Threads Interview Questions Solaris Threads (9)
  • Solaris IPC Interview Questions Solaris IPC (30)
  • Solaris Socket Programming Interview Questions Solaris Socket Programming (3)
  • Solaris System Calls Interview Questions Solaris System Calls (25)
  • Solaris General Interview Questions Solaris General (170)
  • Solaris AllOther Interview Questions Solaris AllOther (297)