04-22-2007
Writing Bash script
Could anyone help me to Write a script in BASH Shell to determine the percentage of system disk space you are using.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm getting the following errors when I try to write a script to unzip some zip files. When I use the free trial copy of the commerical winzip program, however, they work fine. When I use -l or -t on unzip it indicates no errors. When I use the -o switch interactively from the bash command line it... (1 Reply)
Discussion started by: siegfried
1 Replies
2. Shell Programming and Scripting
I've got a few scripts I use for various things, but there is one I have taking the output from a specific command, writing it to disk, and repeating for another command, then reading both (after some formatting) and writing the output to another file.
Part of the reasoning for writing to the... (7 Replies)
Discussion started by: forgottenwizard
7 Replies
3. Shell Programming and Scripting
I want to write a bash script to:
1. Send an email from localhost to an external gmail account. (gmail then automatically forwards the message back to a pop account on the same server.
2. Script waits 3 minutes then checks to see if the email arrived, and if not, it sends an email to... (9 Replies)
Discussion started by: sallyanne
9 Replies
4. Shell Programming and Scripting
Experts,
I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (15 Replies)
Discussion started by: rajuchacha007
15 Replies
5. 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:
I have just gotten into writing bash scripts for a class, part of the assignment is to read and be able to tell... (4 Replies)
Discussion started by: Byrang
4 Replies
6. Shell Programming and Scripting
Im trying to write a script using the host command but its not working properly. I cant understand what Im doing wrong. When I use it at the command prompt, it works fine. But its being used actually in the script, it says its not found: 2 SERVFAIL. Can anyone help me? Here's what I have so far: no... (6 Replies)
Discussion started by: relsha
6 Replies
7. Shell Programming and Scripting
Hi,
I need to automate some repacking tasks of a boot image for Android
When in command line, I can use this command:
mkbootfs /path/to/root > /path/to/ramdisk-recovery.cpio;However, if I try to run the command from a shell script under Ubuntu, it fails and outputs to stdout instead of the... (27 Replies)
Discussion started by: Phil3759
27 Replies
8. Shell Programming and Scripting
Hello,
I want to write a bash script to delete the content after '#'. However, if '#' appears in a string with "", ignore this. For example,
input file:
test #delete
"test #not delete"
Output file:
test
"test #not delete"
Does anyone know how to write this script?
Thanks (1 Reply)
Discussion started by: jeffwang66
1 Replies
9. Shell Programming and Scripting
Hi,
I wanted to load data from HDFS to HIVE by writing bash script.
Description:
I have written a bash script to validate the data and loaded validated data from local file system to HDFS. Now in the same bash script i wanted to load the data from HDFS to HIVE. How can i do it ? Also how tyhe... (2 Replies)
Discussion started by: shree11
2 Replies
10. Shell Programming and Scripting
Hi,
I have a script file where i'm validatig the input file and storing the validated records on HDFS.
I wanted to load data from HDFS to HBASE using pig script. So for that i have created a HBASE table and written pig script to load data from HDFS to HBASE which is working fine. Now i wanted... (0 Replies)
Discussion started by: shree11
0 Replies
LEARN ABOUT DEBIAN
dpm-addpool
DPM-ADDPOOL(1) DPM Administrator Commands DPM-ADDPOOL(1)
NAME
dpm-addpool - define a new disk pool
SYNOPSIS
dpm-addpool --poolname pool_name --def_filesize defsize [ --def_lifetime def_lifetime ] [ --def_pintime defpintime ] [ --gc_start_thresh
perc ] [ --gc_stop_thresh perc ] [ --gid pool_gids ] [ --group pool_groups ] [ --help ] [ --max_lifetime max_lifetime ] [ --max_pintime
maxpintime ] [ --ret_policy retention_policy ] [ --s_type space_type ]
DESCRIPTION
dpm-addpool defines a new disk pool.
This command requires ADMIN privilege.
OPTIONS
pool_name
specifies the disk pool name. It must be at most CA_MAXPOOLNAMELEN characters long.
defsize
specifies the default amount of space reserved for a file. This is by default in bytes, but the number may also be post-fixed with
'k', 'M' or 'G' for kilobyte, Megabyte and Gigabyte respectively.
def_lifetime
specifies the default time a space or volatile file is kept in the system (in seconds).
defpintime
specifies the default time a file is kept on a given disk (in seconds).
gc_start_thresh
specifies the minimum free space in the pool. If the percentage of free space goes below this value, the garbage collector is
started. Default is 0.
gc_stop_thresh
specifies the percentage of free space in the pool above which the garbage collector is stopped. Default is 0.
max_lifetime
specifies the maximum time a space or volatile file is kept in the system (in seconds).
maxpintime
specifies the maximum time a file is kept on a given disk (in seconds).
pool_gids
if not zero, the disk pool is restricted to this comma separated list of group gids.
pool_groups
if set and not "ALL", the disk pool is restricted to this comma separated list of group names.
retention_policy
specifies the retention policy supported by the disk pool. It can be R (for Replica), O (for Output) or C (for Custodial). Default
is R.
space_type
indicates the type of space supported in the disk pool. It can be V (for Volatile), D (for Durable), P (for Permanent) or - (to
accept any type). The latter is the default.
EXAMPLE
dpm-addpool --poolname Volatile --def_filesize 200M --s_type V
EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed.
SEE ALSO
dpm(1), dpm_addpool(3)
LCG
$Date: 2010-02-05 10:50:58 +0100 (Fri, 05 Feb 2010) $ DPM-ADDPOOL(1)