Sponsored Content
Top Forums Shell Programming and Scripting How to consume all available space on partition? Post 302897689 by bbq on Tuesday 15th of April 2014 12:20:38 PM
Old 04-15-2014
Hi Robin

Thanks but I am hoping to perhaps calculate the size in bytes and then create a file in a directory about that size... Perhaps using something like dd?

I wouldn't want the automation suite hanging up for a long time while it generated the files.

This might work though if I create a file that is MB's in size and then copy it until I run out of space.

The idea though, is to leave so little space that the files being loaded would fail to copy across from the source server. So some sort of calculation of size will be required.

Calculating it in K might be accurate enough though. If I just leave a couple of K free then the files will certainly be too large.

Cheers

Brad
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Swap Partition Space

first of all, sorry about my english...I´m a spanish newbie to this marvelous OS and i have just a couple of doubts...u know? :-) 1) how big should my swap partition be if i installed debian 2.2r3 or FreeBSD 4.x on a AMD k7 1400Mhz with 512Mb of Random Access Memory? i heard that those OS... (1 Reply)
Discussion started by: I[X]ION
1 Replies

2. UNIX for Advanced & Expert Users

moving space from one partition to another

How can I move some space allocated to one partition to another, i.e. from "/var" to "/" . Thanks! (4 Replies)
Discussion started by: jason6792
4 Replies

3. Shell Programming and Scripting

Disk space for root partition

Hello, I am trying to monitor disk space for each node on the machine. I am able to get all individual nodes but for the '/' node. For example: df -k: bash-2.05b# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/xxx 4127108 2415340 1502120 62% / /dev/yyy ... (3 Replies)
Discussion started by: chiru_h
3 Replies

4. AIX

How to find the top 6 users (which consume most space)?

Hi everybody, I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ? Trying to use du command was useless. Any idea?... (5 Replies)
Discussion started by: RebelDac
5 Replies

5. Red Hat

RHEL 5 supports only 2 TB space for a partition !

Dear Friends , I am using Redhat Ent Linux 5.0 with a EMC storage which HDD space is 4 TB. After Installing RHEL 5 , I get 4 TB space available but when I am going to create a partition then the OS show 2TB available space . I cannot create a partition above 2TB space . Is there any limitation... (3 Replies)
Discussion started by: shipon_97
3 Replies

6. UNIX for Dummies Questions & Answers

shifting space from one partition to other

hi My System is Sun Microsystems Inc. SunOS 5.10 Solaris Partition Info is /dev/vx/dsk/bootdg/var 27G 25G 1.2G 96% /var /dev/vx/dsk/bootdg/oravol 110G 54G 56G 49% /export/home I want to shift space 20G from /export/home to /var What should be the command ?? (2 Replies)
Discussion started by: kaushik02018
2 Replies

7. Slackware

Ideal partition sizes of 17 gb space.

I am planning to install slack 13.37 on an old stand-alone PIII (512 mb ram) with 17 gb disk space. I need to keep lotsa pdf, chm type e-books for programming with few other misc. documents. I'm going to use this system for my personal use. It has no network but I browse internet with cable... (0 Replies)
Discussion started by: vectrum
0 Replies

8. Linux

How to increase root space from another partition?

Hi OS Experts I would like to increase root partition from another partition so that I can save more documents in Home and Desktop. whether it is possible without formating root partition if so please explain here is o/p of df -h Filesystem Size Used Avail Use% Mounted on /dev/sda9... (8 Replies)
Discussion started by: Akshay Hegde
8 Replies

9. UNIX for Dummies Questions & Answers

How Much Space Before 1st Partition?

Hello All, I'm having trouble finding info on how to convert sector size (*if that's really what i want to do?) to something easier to understand. I'm trying to copy the MBR from a bootable SD Card to another SD Card or image file, but I'm not sure what I should use in my dd command since I'm... (17 Replies)
Discussion started by: mrm5102
17 Replies

10. Red Hat

Allot free space from one partition to other

I have a RHEL 5.3 machine with the following partitions and free space: Free space on the partitions / : 74GB /boot : 81MB /var : 73GB /home : 37GB /icat : 758MB /opt : 1.5GB Now is it possible to allot a free space of some other partitions to /opt? I want around 100 GB more space... (4 Replies)
Discussion started by: omniok
4 Replies
RESIZE_FFS(8)						    BSD System Manager's Manual 					     RESIZE_FFS(8)

NAME
resize_ffs -- resize a file system on disk or in a file SYNOPSIS
resize_ffs [-y] [-s size] special DESCRIPTION
resize_ffs resizes a file system. special is the name of the raw disk device or file where the file system resides. resize_ffs can both grow and shrink file systems. When growing, the disk device must of course be large enough to contain the new file system; resize_ffs simply extends the file system data structures into the new space. When shrinking, resize_ffs assumes this. resize_ffs has to copy anything that currently resides in the space being shrunk away; there must be enough space free on the file system for this to succeed. If there isn't, resize_ffs will complain and exit; when this happens, it attempts to always leave the file system in a consistent state, but it is probably a good idea to check the file system with fsck(8). If no -s option is provided, resize_ffs will grow the file system to the underlying device size which is determined from special. The options are as follows: -s Specify the file system size to which the file system should be resized. The size is given as the count of disk sectors, usually 512 bytes. It will not work correctly for file systems with other sector sizes. To see the exact value, have a look at the disk speci- fication or the disklabel. Mostly used to shrink file systems. -y Disable sanity questions made by resize_ffs. WARNING
Interrupting resize_ffs may leave your file system in an inconsistent state and require a restore from backup. It attempts to write in the proper order to avoid problems, but as it is still considered experimental, you should take great care when using it. When resize_ffs is applied to a consistent file system, it should always produce a consistent file system; if the file system is not consis- tent to start with, resize_ffs may misbehave, anything from dumping core to completely curdling the data. It's probably wise to fsck(8) the file system before and after, just to be safe. You should be aware that just because fsck(8) is happy with the file system does not mean it is intact. EXIT STATUS
resize_ffs exits with 0 on success. Any major problems will cause resize_ffs to exit with the non-zero exit(3) codes, so as to alert any invoking program or script that human intervention is required. EXAMPLES
resize_ffs /dev/vg00/rlv1 will enlarge the file system on the Logical Volume /dev/vg00/lv1 from Volume Group vg00 to the current device size. SEE ALSO
fs(5), fsck(8), newfs(8) HISTORY
The resize_ffs command first appeared in NetBSD 2.0. AUTHORS
der Mouse <mouse@rodents.montreal.qc.ca> (primary author) Jeff Rizzo <riz@NetBSD.org> (Byteswapped file system and UFS2 support) A big bug-finding kudos goes to John Kohl for finding the rotational layout bug referred to in the WARNING section above. BUGS
Can fail to shrink a file system when there actually is enough space, because it does not distinguish between a block allocated as a block and a block fully occupied by two or more frags. This is unlikely to occur in practice; except for pathological cases, it can happen only when the new size is extremely close to the minimum possible. Has no intelligence whatever when it comes to allocating blocks to copy data into when shrinking. Doesn't currently support shrinking FFSv2 file systems. BSD
January 4, 2011 BSD
All times are GMT -4. The time now is 09:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy