Hi,
I want to delete the old log files in the logs directory.
I want to keep logs for a week.What comamnd should i use?
Log file name is prcsstop_121105.log
Many Thanks, (2 Replies)
This be the latest in my problems sorting through router logs... I'm half way there on a problem, but I've hit the limitation of my knowledge
Got some router interface log files of type
router01:GigabitEthernet9/24 is up, line protocol is up (connected)
router01: 0 input errors, 0 CRC, 0... (7 Replies)
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
As per my knowledge we need to take back up of a log file before clearing the log file then needs to perform this like this: ">logfile".
Please correct me if I am wrong. And add your comments if any.
Also I want to understand how will ">" this help in clearing the log file. Whats wrong if we... (6 Replies)
HI All,
I have a file with contents like this:
apple
computer
terminal
applecomputernetworkrouterterminalrouter
network
router
applecomputernetworkrouterterminalrouter
I want to remove all lines with length greater than "18 alphabets". Hence, my output should be:
apple
computer... (1 Reply)
Hi, as the title states i need to find a way to search a column for values great than 1000, and if it is, then delete that row.
An example
1 7.021 6.967 116.019 4 U 6.980E+07 0.000E+00 e 0 0 0 0
2 8.292 7.908 118.063 3 U 1.440E+07 0.000E+00 e 0 821 814 ... (3 Replies)
Hi All,
I have written a script to check the file system usage and to delete the files which is consuming more space.Please check whether the script is corrcet
#Script Starts here
#!/usr/local/bin/perl
#Program to find the disk space and to delete the older files
#Checks the type of OS... (8 Replies)
Here is the script I want to run to deleted log files after a certain time:
touch /usr/WebSphere/AppServer/profiles/AppSrv01/apps/RSA/logs
find /usr/WebSphere/AppServer/profiles/AppSrv01/apps/RSA/logs -atime +120 - exec rm -rf {}\;
Exerytime I run it, it throws me the error:
find: paths must... (2 Replies)
Hi,
I am new to Shell scripts.
I have an urgent requirement to find the disk space using "df -k".
from that output,I need to check the used% whether greater than 85%.
if it is greater than 85% then need to delete my log files.
It is very urgent please some one help me.
Thanks in Advance... (1 Reply)
I have a log file with contents like below.
Repository: https://someserver:9443/
Workspace: (1000) "test_scripts_ws"
Component: (1001) "some_Automated_Scripts"
Change sets:
(1002) ---$ john "test memory" 17-Sep-2014 02:24 PM
Changes:
--a--... (9 Replies)
Discussion started by: gaurav99
9 Replies
LEARN ABOUT OPENSOLARIS
space
space(4) File Formats space(4)NAME
space - disk space requirement file
DESCRIPTION
space is an ASCII file that gives information about disk space requirements for the target environment. The space file defines space needed
beyond what is used by objects defined in the prototype(4) file; for example, files which will be installed with the installf(1M) command.
The space file should define the maximum amount of additional space that a package will require.
The generic format of a line in this file is:
pathname blocks inodes
Definitions for the fields are as follows:
pathname Specify a directory name which may or may not be the mount point for a filesystem. Names that do not begin with a slash ('/')
indicate relocatable directories.
blocks Define the number of disk blocks required for installation of the files and directory entries contained in the pathname (using
a 512-byte block size).
inodes Define the number of inodes required for installation of the files and directory entries contained in the pathname.
EXAMPLES
Example 1 A sample file.
# extra space required by config data which is
# dynamically loaded onto the system
data 500 1
SEE ALSO installf(1M), prototype(4)
Application Packaging Developer's Guide
SunOS 5.11 7 Feb 1997 space(4)