When i try to execute the below command from command line I'm getting the required output.
But when i try to execute the same in script i'm receving the below exception
Please guide me.
---------- Post updated 06-13-12 at 08:24 PM ---------- Previous update was 06-12-12 at 11:15 PM ----------
Hi All,
Could some one guide me
When i try to execute the below command from command line I'm getting the required output.
Code:
df -h $FILESYSTEM -exec | grep -v "Filesystem" | sed -e "s/%//g"|awk '{print $5}'
But when i try to execute the same in script i'm receving the below exception
Code:
bash-2.05$ ./diskusage.plThe Operating System is SunOSEnter the filesystem related to SUN/u001sh: syntax error at line 2: `|' unexpected
Please guide me.
Last edited by Franklin52; 06-13-2012 at 03:45 AM..
Reason: Please use code tags for data and code samples
hello,
I have to check the free space on the disk that would work both on Windows and Unix platform e.g on C: \ for Windows and / on Unix. I could use Unix command 'df ' ( my windows system has Unix emulator cygwin and could run 'df ' as well).
But I'd like not to rely on system command but... (1 Reply)
Hi,
I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes.
I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Hello,
Can anybody please tell me the command to find out the filesystem or a file which is consuming larger disk space sing i want to find out the file and want to compress it
please help me out
any help would be appreciated (6 Replies)
Some times my disk space is used upto 100% due to the application logs .
So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Hi all,
FreeBSD7.1 @ sh.
In a backup script I am trying to get the blocks used by the backup once completed.
I am using the function:
#!/bin/sh
spaceused()
{
du -d 0 "${1}" | awk -F"+" '{ print $1 }
}
to return the blocks used of said directory and contents.
Via. command line... (7 Replies)
Issue with disk space usage
I have the following line in my "df -h" output:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 496M 495M -39M 109% /
What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Given this directory /web
I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ?
The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux.
My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
Hi,
Could you please provide OS command to find large files in size MB and GB... under specific directory in HP-UX?
Regards,
Maddy (4 Replies)
Discussion started by: Maddy123
4 Replies
LEARN ABOUT LINUX
checksecurity
CHECKSECURITY(8) System Manager's Manual CHECKSECURITY(8)NAME
checksecurity - Run a collection of simple system checks
SYNOPSIS
checksecurity
DESCRIPTION
The checksecurity command runs a small collection of simple system checks which are designed to catch a few common security issues. check-
security is run by cron in a daily basis.
CONFIGURATION
The checksecurity.conf file defines several configuration variables: MAILTO, CHECK_DISKFREE, CHECK_PASSWD and CHECK_SETUID LOGDIR. Each is
described below.
The checksecurity program works with a collection of plugins which are located in /usr/share/checksecurity and are configured individually
by their own configuration file.
CHECK_PASSWD If this is set to TRUE then the check-passwd script will be invoked. This script is designed to report upon system accounts
which have no passwords. CHECK_DISKFREE If this is set to TRUE then the check-diskfree script will be invoked and will allow an alert to
be sent if there is any mounted partition is running short on disk space. CHECK_SETUID If this is set to TRUE then the check-setuid script
will be invoked, this will compare the setuid binaries upon the system to those that existed previously and show the differences.
FILES
/etc/checksecurity.conf
checksecurity configuration file
SEE-ALSO
See also check-diskfree(8), check-setuid(8), and check-passwd(8)Debian Linux 2 February 1997 CHECKSECURITY(8)