- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Artificial limit of file sizes by row count?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:29 AM
тАО08-14-2002 08:29 AM
Artificial limit of file sizes by row count?
Is it possible to limit the size of a file based upon row count? I am aware of the default quota options (aggregate inode/size limits), but I do not know of a way to limit file size based upon number of lines - or individual file size.
It seems like this would be a complicated request - i.e., there is first an assumption of an ASCII file. Then, would this be something initiated at the file, directory or file-system level? Perhaps there are other complications as well.
However, I thought I'd ask before I said, "Impossible."
If enforcing a limit is impossible, I???ll give 10 points to the response with the most efficient alarm for files over 100,000 lines in a given file system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:32 AM
тАО08-14-2002 08:32 AM
Re: Artificial limit of file sizes by row count?
As you say it would be very difficult to implement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:35 AM
тАО08-14-2002 08:35 AM
Re: Artificial limit of file sizes by row count?
I don't know of anything that would "naturally" enforce this kind of limitaton -- total character size, yes, butnumber of lines, no.
I suppose you could write a script that periodically uses something like 'wc -l file' to interrogate file line counts and if exceeded do whatever it is you want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:35 AM
тАО08-14-2002 08:35 AM
Re: Artificial limit of file sizes by row count?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:43 AM
тАО08-14-2002 08:43 AM
Re: Artificial limit of file sizes by row count?
You can disable 'largefiles' support (nolargefiles') on a filesystem basis, thereby limiting creation of files within that filesystem to 2GB. However, this does not address your 100,000 *line* limitation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:50 AM
тАО08-14-2002 08:50 AM
Re: Artificial limit of file sizes by row count?
I could probably use an average line length to calculate a byte-level limitation...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 09:00 AM
тАО08-14-2002 09:00 AM
Re: Artificial limit of file sizes by row count?
If it's the 2gig limit you're most worried about then a possible idea is to run a find from cron that checks for files of that size within specific directories. The downside is that it will be reactive rather than proactive, plus it's not efficient to run find constantly.
Another alternative is to have a separate filesystem that will accept largefiles, write the files in there, then copy/move the files to the correct place IF they are below 2gig.
regards,
Darren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 09:11 AM
тАО08-14-2002 09:11 AM
Re: Artificial limit of file sizes by row count?
for FILE in `find /home`
do
if [ wc -l $FILE -gt 100000 ]
then
echo "naughty file " $FILE
fi
done
In case you hadn't guessed, scripting is not my strong suit but this oughtta do something for you.
Pete
Pete