Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators How to Post in the The UNIX and Linux Forums Very Urgent ---Need to delete the log files when the disk used% greater than 85% using df -k* Post 302878293 by Anandbarnabas on Thursday 5th of December 2013 11:59:19 AM
Old 12-05-2013
Hammer & Screwdriver Very Urgent ---Need to delete the log files when the disk used% greater than 85% using df -k*

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
Anandbarnabas
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to delete log files

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

Script to archive log files:Urgent Help required

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

Check numeric fields greater than zero, and delete lines if appropriate

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

Delete files older than "x" if directory size is greater than "y"

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

What is the best way to delete log files?

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

Delete words greater than a specific length

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

search column and delete row if greater than value

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

Perl Script to find the disk usage and to delete the files which is consuming more space

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

Delete log files automatically.

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

Need to delete the log files when the disk used% greater than 85% using df -k

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
t_rcv(3)						     Library Functions Manual							  t_rcv(3)

NAME
t_rcv() - receive data or expedited data sent over a connection SYNOPSIS
DESCRIPTION
The function receives either normal or expedited data. fd identifies the local transport endpoint through which data will arrive. buf points to a receive buffer where user data will be placed. nbytes specifies the size of the receive buffer. flags may be set on return from and specifies optional flags as described below. By default, operates in synchronous mode and will wait for data to arrive if none is currently available. However, if is set (via or will execute in asynchronous mode and will fail if no data is available. (See [TNODATA] below.) On return from the call, if is set in flags, this indicates that there is more data. Thus, the current transport service data unit (TSDU) or expedited transport service data unit (ETSDU) must be received in multiple calls. In the asynchronous mode, the flag may be set on return from the call even when the number of bytes received is less than the size of the receive buffer specified. Each with the flag set indicates that another must follow immediately to get more data for the current TSDU. The end of the TSDU is identified by the return of a call with the flag not set. If the transport provider does not support the concept of a TSDU as indicated in the info argument on return from or the flag is not meaningful and should be ignored. If nbytes is greater than zero on the call to will return 0 only if the end of a TSDU is being returned to the user. On return, the data returned is expedited data if is set in flags. If the number of bytes of expedited data exceeds nbytes, will set and on return from the initial call. Subsequent calls to retrieve the remaining ETSDU will have set on return. The end of the ETSDU is iden- tified by the return of a call with the flag not set. If expedited data arrives after part of a TSDU has been retrieved, receipt of the remainder of the TSDU will be suspended until the ETSDU has been processed. Only after the full ETSDU has been retrieved not set) will the remainder of the TSDU be available to the user. In synchronous mode, the only way for the user to be notified of the arrival of normal or expedited data is to issue this function or check for the or events using the function. XTI Internet Protocol-specific Information The flag should be ignored if normal data is delivered. If a byte in the data stream is pointed to by the TCP urgent pointer, as many bytes as possible preceding this marked byte and the marked byte itself are denoted as urgent data and are received with the flag set. If the buffer supplied by the user is too small to hold all urgent data, the flag will be set, indicating that urgent data still remains to be read. Note that the number of bytes received with the flag set is not necessarily equal to the number of bytes sent by the peer user with flag set. Fork Safety is not fork-safe. RETURN VALUE
Upon successful completion, returns the number of bytes received. Otherwise, it return -1 and is set to indicate the error. ERRORS
On failure, is set to one of the following: The specified identifier does not refer to a transport endpoint. was set, but no data is currently available from the transport provider. An asynchronous event has occurred on this transport endpoint and requires immediate attention. This function is not supported by the underlying transport provider. (XTI only) The function was issued in the wrong sequence on the endpoint referenced by fd. A system error has occurred during execution of this function. (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI ( SEE ALSO
fcntl(2), t_getinfo(3), t_look(3), t_open(3), t_snd(3), thread_safety(5). STANDARDS CONFORMANCE
t_rcv(3)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy