Sponsored Content
Full Discussion: Disk space reporting
Top Forums Shell Programming and Scripting Disk space reporting Post 302344833 by niranjandighe on Monday 17th of August 2009 06:32:59 PM
Old 08-17-2009
Disk space reporting

I need to accomplish the following task -
I have a number of accounts for a number of applications that i deploy on a unix server. There are a number of directories for each account in /prod/apps directory. eg. For an account Application1 I have /prod/apps/Application1_1 /prod/apps/Application1_2 etc. Now I need to gather the information about the usage of each folder under each of /prod/apps. For that I want to sudo su to each application account and then gather the info by say du or df or ls -l. I tried to use expect script but once I execute a sudo su - application1 and output the password the script gets blocked because a new shell is spawned.
Kindly help me out of the issue. Also suggest me any other method if there is one.
Thanks in advance
-Niranjan
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Out of disk space?

Hi I'm trying to install gcc and the installation program tells me that I'm out of disk space! I have just installed the os (using the default settings for partitions and sizes) and have only installed apache on the machine. Can it really be out of disk space already? How do I check how much... (4 Replies)
Discussion started by: alfabetman
4 Replies

2. Filesystems, Disks and Memory

Disk Space -

I know I have posted this question before, but I still just don't understand how to determine disk space. This server is an IBM RS6000 running on AIX version 4.2.1. I in essence need to know the following if anyone can assist me. 1) I need to know how many drives are configured in the... (2 Replies)
Discussion started by: Docboyeee
2 Replies

3. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies

4. HP-UX

Disk Space

Hi Experts. I had 100% disk full , even though i have removed 2 GB space still dbf command shows 100%. How to rectify that. Appreciate your prompt help. Thanks (1 Reply)
Discussion started by: test10002
1 Replies

5. Shell Programming and Scripting

Disk Space

HI ... I am New to the Unix...I am trying to write a script to check the disk space. But i am not able to write it. I know the command to check the disk space df -k,but unable to write the script..Can any body help me... Thanks in advance... (3 Replies)
Discussion started by: Kingkon
3 Replies

6. Filesystems, Disks and Memory

disk space

Hello All- Am new member to this forum. Have some unix experience. But true believer in it compared to windows. Have a question regarding the disk space. I know a command to check the total disk space utilization using: df -k . but what is the command to check the same disk space by... (6 Replies)
Discussion started by: milkyway
6 Replies

7. Shell Programming and Scripting

Disk Space

Hi This is my script for disk space monitoring clear if then echo "You must be root user to execute the script" fi ALERT_LEVEL=10 CONSUMPTION_LEVEL= `df -k | awk {'print $5'} | cut -d '%' -f1 | sed "1 d"` for i in $CONSUMPTION_LEVEL do FILE_SYSTEM=`df -k | awk {'print $1'} |... (3 Replies)
Discussion started by: chrs0302
3 Replies

8. Red Hat

disk space

when i check /export directory of my machine gets filled up (85%) i removed some old logs. but after cleaning df -k command still shows that /export is still 85% full. Is there a way to force df to reflect actual free space without rebooting? My machine is a production one and can't... (8 Replies)
Discussion started by: aboorkuma
8 Replies

9. Shell Programming and Scripting

Disk Space

Hi Guys i have a nice little piece of code then i need to modify so that is does not look at /Voulmes/* thanks sub disk_full { my $i = 0; open( DF, "df -l|" ); while (<DF>) { #chomp(); next if (/^\/proc\b/); $i++; next if ( $i == 1 ); ... (3 Replies)
Discussion started by: ab52
3 Replies

10. UNIX for Dummies Questions & Answers

How much disk space?

Hi, I have this : uname -a Linux servername 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 23 15:57:10 EDT 2010 i686 i686 i386 GNU/Linux df -k Sys. de fich. 1K-blocs Occupied Disponible Capacity Monted on /u01/applis 10321208 3190160 6606760 33% /applis Does it mean... (1 Reply)
Discussion started by: big123456
1 Replies
clipf(1)						      General Commands Manual							  clipf(1)

NAME
clipf - Personal finance manager with command line interface SYNOPSYS
clipf [<conf_dir>] DESCRIPTION
Simple personal finance manager, allow to track Your incomes/expences by accounts and hierarchical categories. Store all data in flat text files. ARGUMENTS
<conf_dir> Directory with configuration file and data files. Default to ~/.clipf/. If there is no such directory found at program startup, it would be created and populated by default configuration and empty data files. DEFINITIONS
account - describe independent money storage, for which You want to track remains and turnover. item - describe categories of Your incomes/expences. Can be nested as files/directories in file system. item code - it is segmented unique identifier of item/item group. Period "." in item code define nesting levels. Period at the end of item code describe, that this item is group (have subling items). operation - define single money transaction (income or expense). tag - arbitrary string, used for additional classification of operations. Have the same nesting rules as items. Any number of tags can be added to each operation. It may be good idea to store available tags in item list. USAGE
Type help to see available commands. Type help <command> to see online help about particular <command>. For most reporting commands, output can be piped to external shell command the same way, as shell do. COMMANDS CONCERNING ITEMS
prod add [-d] <item_code> <item_name> Add new item. Type <item_name> in quotes, if it contain spaces. -d - define this item as income (default to expence). prod rm <item_code_prefix> Remove all items, which code starts with <item_code_prefix>. This don't affect the operations list. prod ls [<item_code>] Show one level of item list - direct sublings of <item_code>. Default to root level. prod mv <old_item_code_prefix> <new_item_code_prefix> Update all item codes, which starts with <old_item_code_prefix>, replacing it to <new_item_code_prefix>. Item codes in operation list would be updated as well. COMMANDS CONCERNING OPERATIONS
op add [-d <date>] [-a <account>] [-t <tag>] <item_code> <amount> [<note>] Add new operation -d <date> - override default operation date to <date>. -a <account> - override defaut operation account to <account> -t <tag> - label operation with <tag>. Any number of -t options can be used to add several tags to operation. op ls [-t <tag_prefix>] [<item_code_prefix>] Show list of operations in current reporting period. If <item_code_prefix> specified, list would be limited by the operations, which item code starts with <item_code_prefix>. If '-t <tag_prefix>' option specified, limit output with operations, labelled with tag, starts with <tag_prefix> COMMANDS CONCERNING REPORTING
Reporting period is always between <date_from> and <date_to> global options, which You set by set command. rep prod [-t <tag_prefix>] [-a <account>] [<item_code>] Show turnover report for items (item groups), which are direct subling of <item_code> (default to root). Turnover for item group is summ of turnovers of all their nested items/groups. -t <tag_prefix> take into account only operations, labelled with tag, starts with <tag_prefix> -a <account> take into account only operations by <account> account. rep acc Show remains and turnovers for all accounts. OTHER COMMANDS
set <option> <value> Set global option <option> value to <value>. For date options, base format is Y-M-D. Leading 0 can be ommited. For the current year, year part can be ommited. For current month, year and month parts can be ommited. Available options: date - default date for new operations. Can be overriden by -d option of "op add". date_from date_to - reporting period for "op ls" and all "rep" subcommands. acc - default account for new operations. Can be overriden by -a option of "op add". max_lines - if number of lines in report output exceed this value, then "less" would be used to show report output. show [<option>] Show current values of all global options or specified <option>. calc <expression> Embedded calculator. Evaluate numeric expression and print the result. ALIASES
Aliases is the simple way to make shortcuts for frequently used commands. Alias can be defined by the pair of strings: <command_line_pre- fix> and <prefix_substitution_string>. If command line starts with any of the defined aliases <command_line_prefix>, this prefix would be substituted with corresponding <prefix_substitution_string>. Examples can be found in system configuration file (see FILES ). EXAMPLES
set date_from 2008-04-01 - set reporting start period to 2008-04-01. r prod - show turnover report by top level items. op ls | grep foo | less pipe report output to shell command. op ls | cat - >somefile.txt save report output to file FILES
All configuration files have the same format - plain python code, that would be executed during clipf startup, in the context of main mod- ule. More specific configuration file can overwrite settings from more general one. /etc/clipf.conf system-wide configuration file ~/.clipf.conf user-specific configuration <config_path>/clipf.conf configuration-specific settings. ~/.clipf/ Default configuration directory. Contain clipf.conf configuration file, and db/ subdirectory with data files. AUTHOR
Denis Galtsev <galtsevdv@gmail.com> SEE ALSO
Program site at: http://code.google.com/p/clipf/ clipf(1)
All times are GMT -4. The time now is 05:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy