12-05-2013
Everyone at the UNIX and Linux Forums gives their best effort to reply to all questions in a timely manner. For this reason, posting questions with subjects like "Urgent!" or "Emergency" and demanding a fast reply are not permitted in the regular forums.
For members who want a higher visibility to their questions, we suggest you post in the
Emergency UNIX and Linux Support Forum. This forum is given a higher priority than our regular forums.
Posting a new question in the
Emergency UNIX and Linux Support Forum requires forum
Bits. We monitor this forum to help people with emergencies, but we do not not guarantee response time or best answers. However, we will treat your post with a higher priority and give our best efforts to help you.
If you have posted a question in the regular forum with a subject "Urgent" "Emergency" or similar idea, we will, more-than-likely, close your thread and post this reply, redirecting you to the proper forum.
Of course, you can always post a descriptive subject text, remove words like "Urgent" etc. (from your subject and post) and post in the regular forums at any time.
Furthermore, "post here to contact site administrators and moderators" is an inappropriate place to post a technical question.
Thank you.
The UNIX and Linux Forums
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: castlerock
2 Replies
2. Shell Programming and Scripting
I have no prior knowledge of Unix shell scripting,but my requriment demands to wrie a script that do fallowing things.
1.Delete older than one year log files
2.Moves files in to the directories as YYYYMM wise.
3.If files in $LOGDIR older than n=2 months tar and move them to $ARCHIVEDIR... (5 Replies)
Discussion started by: vamsx
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: Yorkie99
7 Replies
4. Shell Programming and Scripting
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)
Discussion started by: JamesCarter
4 Replies
5. UNIX for Advanced & Expert Users
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)
Discussion started by: praveen_b744
6 Replies
6. Shell Programming and Scripting
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)
Discussion started by: shoaibjameel123
1 Replies
7. Shell Programming and Scripting
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)
Discussion started by: olifu02
3 Replies
8. Shell Programming and Scripting
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)
Discussion started by: arunkarthick
8 Replies
9. Shell Programming and Scripting
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)
Discussion started by: lennyz04
2 Replies
10. Shell Programming and Scripting
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... (2 Replies)
Discussion started by: Anandbarnabas
2 Replies
LEARN ABOUT LINUX
disksup
disksup(3erl) Erlang Module Definition disksup(3erl)
NAME
disksup - A Disk Supervisor Process
DESCRIPTION
disksup is a process which supervises the available disk space in the system. It is part of the OS_Mon application, see os_mon(7) . Avail-
able for Unix and Windows.
Periodically checks the disks. For each disk or partition which uses more than a certain amount of the available space, the alarm
{{disk_almost_full, MountedOn}, []} is set.
On Unix :
All (locally) mounted disks are checked, including the swap disk if it is present.
On WIN32 :
All logical drives of type "FIXED_DISK" are checked.
Alarms are reported to the SASL alarm handler, see alarm_handler(3erl) . To set an alarm, alarm_handler:set_alarm(Alarm) is called where
Alarm is the alarm specified above.
The alarms are cleared automatically when the alarm cause is no longer valid.
CONFIGURATION
The following configuration parameters can be used to change the default values for time interval and threshold:
disk_space_check_interval = int()>0 :
The time interval, in minutes, for the periodic disk space check. The default is 30 minutes.
disk_almost_full_threshold = float() :
The threshold, as percentage of total disk space, for how much disk can be utilized before the disk_almost_full alarm is set. The
default is 0.80 (80%).
See config(5) for information about how to change the value of configuration parameters.
EXPORTS
get_disk_data() -> [DiskData]
Types DiskData = {Id, KByte, Capacity}
Id = string()
KByte = int()
Capacity = int()
Returns the result of the latest disk check. Id is a string that identifies the disk or partition. KByte is the total size of the
disk or partition in kbytes. Capacity is the percentage of disk space used.
The function is asynchronous in the sense that it does not invoke a disk check, but returns the latest available value.
Returns [{"none",0,0}] if disksup is not available.
get_check_interval() -> MS
Types MS = int()
Returns the time interval, in milliseconds, for the periodic disk space check.
set_check_interval(Minutes) -> ok
Types Minutes = int()>=1
Changes the time interval, given in minutes, for the periodic disk space check.
The change will take effect after the next disk space check and is non-persist. That is, in case of a process restart, this value is
forgotten and the default value will be used. See Configuration above.
get_almost_full_threshold() -> Percent
Types Percent = int()
Returns the threshold, in percent, for disk space utilization.
set_almost_full_threshold(Float) -> ok
Types Float = float(), 0=<Float=<1
Changes the threshold, given as a float, for disk space utilization.
The change will take effect during the next disk space check and is non-persist. That is, in case of a process restart, this value
is forgotten and the default value will be used. See Configuration above.
SEE ALSO
alarm_handler(3erl) , os_mon(3erl)
Ericsson AB os_mon 2.2.5 disksup(3erl)