07-15-2007
Quote:
Originally Posted by
xramm
I tested it\ and seems to be working well/
I need to test for some time
Thanks
You really should try to move the find command outside the while loop, it is the slowest part of your program and really only needs to be done once.
If your script was in ksh I would have suggested using a co-process and using 'read -p' however it is not, so you could do this by using a temporary file or a named pipe.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How I do to check disk not use in my server.
Sun Solaris 2.8
df -k
du |sort -rn
But I want check disk and analyse a file system not used.
Thanks for reply. (1 Reply)
Discussion started by: chris_carmo
1 Replies
2. UNIX for Dummies Questions & Answers
How can we check the number of hard disks (both internal & external) in a server, their capacity and serial number (5 Replies)
Discussion started by: muneebr
5 Replies
3. Shell Programming and Scripting
I have a disk space check script that uses an exceptions file, the only issue with the script is that it does not work with values higher than the FSMAX=85 value. I have a file system that is at 92% and it doesn't change, so I would like to add it to the exceptions file. The exceptions file format... (0 Replies)
Discussion started by: maddhadder71
0 Replies
4. Shell Programming and Scripting
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)
Discussion started by: susja
1 Replies
5. Shell Programming and Scripting
Hi all, I am needing a bash shell script to generate a list of the top 5 users using the most disk space. I am thinking that the du command would be used somehow but I am at a loss. Can anyone help? Thanks! (3 Replies)
Discussion started by: sytemx
3 Replies
6. Solaris
Hi,
I have a question regarding finding free space on the disk of a solaris machine.
Many mount points are available in my machine. Right now i am using
df -b option to get the free disk space available.
I have an assignment to check free space on the disk.
I pass the directory as a... (6 Replies)
Discussion started by: raghu.amilineni
6 Replies
7. UNIX for Dummies Questions & Answers
Is there a UNIX check hard disk utility similar to the DOS utility chkdsk ?
If there is one can it fix hard disk problems like checkdsk /f can with a DOS system?
Where can I find these commands? (1 Reply)
Discussion started by: hatcity
1 Replies
8. Solaris
Hi,
How to check disk io mount pointwise? I am working as Oracle DBA and want to check disk io as per mount point for adding new datafiles in tablesapce or change my redolog files to lowest disk I/O mount point. My all mount points are like /data1, /data2, /data3 ,,,,,. Can somebody tell me how... (1 Reply)
Discussion started by: rahul_switch
1 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Need to check the disk space and if any portion disk space usage high then write to one file, later will... (5 Replies)
Discussion started by: Jasminshakoor
5 Replies
10. Shell Programming and Scripting
I am trying a script which will alert if disk space crosses some threshold, i googled it and got some scripts already, but they are not working with my server.
The problem is, my filesystem names are big, so the sizes are moving to the second line. just like below
any ideas? thanks in advance... (8 Replies)
Discussion started by: karthikeayan
8 Replies
LEARN ABOUT LINUX
service
service(8) System Manager's Manual service(8)
NAME
service - run a System V init script
SYNOPSIS
service SCRIPT COMMAND [OPTIONS]
service --status-all
service --help | -h | --version
DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working
directory set to /.
The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and
stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start
command.
service --status-all runs all init scripts, in alphabetical order, with the status command.
EXIT CODES
service calls the init script and returns the status returned by it.
FILES
/etc/init.d
The directory containing System V init scripts.
ENVIRONMENT
LANG, TERM
The only environment variables passed to the init scripts.
SEE ALSO
/etc/init.d/skeleton,
update-rc.d(8),
init(8),
invoke-rc.d(8).
Jan 2006 service(8)