[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1067
  • Last Modified:

Cleaning up files in a IPSO 3.8 directory

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
oscarhic
Asked:
oscarhic
  • 5
  • 4
1 Solution
 
gheistCommented:
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
 
oscarhicAuthor Commented:
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
 
oscarhicAuthor Commented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
gheistCommented:
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
 
oscarhicAuthor Commented:
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
 
gheistCommented:
Yopu have to use path of /var
0
 
oscarhicAuthor Commented:
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
 
oscarhicAuthor Commented:
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
 
gheistCommented:
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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now