Solved

Cleaning up files in a IPSO 3.8 directory

Posted on 2006-11-09
9
1,048 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 61

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
 
LVL 61

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 61

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 61

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now