Solved

Cleaning up files in a IPSO 3.8 directory

Posted on 2006-11-09
9
1,054 Views
Last Modified: 2013-12-16
I have a Checkpoint FW1 running IPSO 3.8. I have noticed that my /var /dev/wd0d has overunn the preferred disk space. How do I list the files in this directory and remove the older ones. Please keep in mind, I am not even sure if  I am giving enough information to help me, mainly because i do not know where to look.  I am basing this off what error messages say when i connect to the firewall. I am using putty  to connect to the appliance. I am not a unix or linux inclined person, however i can pick up pretty quickly. thanks for your assistance
0
Comment
Question by:oscarhic
  • 5
  • 4
9 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 17923419
IPSO is basically FreeBSD with few customizations.

On normal FreeBSD one would remove very old files

find /full/partition -type f -atime +180 -mtime +180 -ctime +180 | xargs rm -i
0
 

Author Comment

by:oscarhic
ID: 17931306
thanks GHEIST for your reply, however would  you mind explaning what the command line syntax you gave means in (english). I want to understand what I am doing before I  actually do it.
0
 

Author Comment

by:oscarhic
ID: 17931882
cfd1e007[admin]# df
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd0f      598029    82796   467391    15%    /
/dev/wd0a       37556       37    34515     0%    /config
/dev/wd0d    14732935 14467520  -913219   107%    /var
/dev/wd0e     2561196   356557  1999744    15%    /opt
procfs              4        4        0   100%    /proc

here is what a df gives me. hope this is helpful
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 62

Accepted Solution

by:
gheist earned 300 total points
ID: 17936512
find - command
/full/partition - path to start from
-type f - objects of file type
-atime +180 - unaccessed for 180 days
-mtime +180 - unmodified ...
-ctime +180 - not created ...
| - shell pipe
xargs - command to pass input as arguments
rm - remove
-i - interactively
0
 

Author Comment

by:oscarhic
ID: 17939436
okay that makes  more sense, however when  i go to the path of /dev/wd0d  i get the following:

FW1[admin]# find /var/dev/wd0d -type f -atime +180 -mtime +180 -ctime +180 | xargs rm -i
find: /var/dev/wd0d: No such file or directory
FW![admin]#

what am i doing wrong?
0
 
LVL 62

Expert Comment

by:gheist
ID: 17941487
Yopu have to use path of /var
0
 

Author Comment

by:oscarhic
ID: 17941591
find /var -type f -atime +180 -mtime +180 -ctime +180 | xargs rm -i

i used the following command and nothing happened. i got a screen full of this type of info with  no results. any ideas?

FW1[admin]# find /var -type f -atime +180 -mtime +180 -ctime +180 | xargs rm -i
find: fts_read: No such file or directory
remove /var/etc/hosts.equiv? remove /var/etc/dhcpc.leases? remove /var/log/cron?                              remove /var/tmp/vi.recover/vi.023817? remove /var/tmp/vi.recover/recover.023817                             ? remove /var/tmp/vi.recover/vi.023831? remove /var/tmp/vi.recover/vi.025330? re                             move /var/tmp/cplmd.core? remove /var/tmp/capture.txt? remove /var/tmp/capture1.                             pcap? remove /var/tmp/capture3.pcap? remove /var/tmp/capture4.pcap? remove /var/                             tmp/capture5.pcap? remove /var/tmp/capture7.pcap? remove /var/tmp/capture8.pcap?                              remove /var/crash/minfree? remove /var/opt/CPshared-R55p/conf/cp.license_10.63.                             254.10? remove /var/opt/CPfw1-R55p/state/__tmp/CPDB/sig.map? remove /var/opt/CPf                             w1-R55p/log/cpstat_monitor.elg? remove /var/opt/CPfw1-R55p/log/2004-11-08_000100                             .loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2004-11-29_000100.logaccount_ptr                             ? remove /var/opt/CPfw1-R55p/log/2004-11-08_000100.logaccount_ptr? remove /var/o                             pt/CPfw1-R55p/log/2004-11-15_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/l                             og/2004-11-15_000100.logaccount_ptr? remove /var/opt/CPfw1-R55p/log/2004-11-22_0                             00100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2004-11-22_000100.logaccoun                             t_ptr? remove /var/opt/CPfw1-R55p/log/2004-11-29_000100.loginitial_ptr? remove /                             var/opt/CPfw1-R55p/log/2004-12-06_000100.logaccount_ptr? remove /var/opt/CPfw1-R                             55p/log/2004-12-06_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2004-12                             -13_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2004-12-13_000100.loga                             ccount_ptr? remove /var/opt/CPfw1-R55p/log/2004-12-20_000100.loginitial_ptr? rem                             ove /var/opt/CPfw1-R55p/log/2004-12-20_000100.logaccount_ptr? remove /var/opt/CP                             fw1-R55p/log/2006-04-16_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/20                             04-12-27_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2004-12-27_000100                             .logaccount_ptr? remove /var/opt/CPfw1-R55p/log/2006-04-16_000100.logaccount_ptr                             ? remove /var/opt/CPfw1-R55p/log/2006-04-23_000100.logaccount_ptr? remove /var/o                             pt/CPfw1-R55p/log/2006-04-30_000100.logaccount_ptr? remove /var/opt/CPfw1-R55p/l                             og/2006-04-23_000100.loginitial_ptr? remove /var/opt/CPfw1-R55p/log/2006-05-07_0                             00100.logaccount_ptr? remove /var/opt/CPfw1-R55p/log/2006-04-30_000100.loginitia                             l_ptr? remove /var/opt/CPfw1-R55p/log/2006-05-14_000100.logaccount_ptr? remove /                             var/opt/CPfw1-R55p/log/2006-05-07_000100.loginitial_ptr? remove /var/opt/CPfw1-R                             55p/log/2006-05-14_000100.loginitial_ptr?

FW1[admin]# df
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd0f      598029    82796   467391    15%    /
/dev/wd0a       37556       37    34515     0%    /config
/dev/wd0d    14732935 14505342  -951041   107%    /var
/dev/wd0e     2561196   356557  1999744    15%    /opt
procfs              4        4        0   100%    /proc

FW1[admin]#
0
 

Author Comment

by:oscarhic
ID: 17942472
thanks for the help and direction, it evenutally pointed me in the right direction. i just needed a command list and was able to complete the task at hand. you are awarded the points.
0
 
LVL 62

Expert Comment

by:gheist
ID: 17944768
I just put together all commands you may need.
Basically you have to rotate biggest log files using /etc/newsyslog.conf in freebsd, not sure about IPSO
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question