Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to calculate the file size? Post 5605 by Neo on Friday 17th of August 2001 01:45:22 PM
Old 08-17-2001
And to keep the site from being perceived as a place that answers homework problems for students, please please, do not answer homework problems. We will just delete the obvious ones and if users continue to post them, appropriate actions will be taken.

As I recall, the user rooh tends to asks lots of homework problems.

Thanks for all the great comments and posts!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to calculate file's size in directory and subdirectory

Hi, I have written one script to calculate total space of all file in one directory, ignoring subdirectory, it works fine. Now, I've been trying to calculate all files which includes files in any subdirectories. I use recursive function to do this, but it can work only if there is only one... (4 Replies)
Discussion started by: KLL
4 Replies

2. Shell Programming and Scripting

calculate size of some files

Hi, 1-I want to calculate the size of all files which are generated during last month in a directory. How can I do that ? Of cours, I find them by : $ls -l | grep jun but how to calculate the sum of their size ? 2- the same but for all files generated last month and before that. many thanks... (11 Replies)
Discussion started by: big123456
11 Replies

3. UNIX for Dummies Questions & Answers

calculate directory size by year of file

I need to calcualte the size of a directory by the year the files in that directory were created . For example the script will sum up, by year, the number of blocks for that directory and its' subdirectories for files created / accessed in that year. I need a report that would look like... (11 Replies)
Discussion started by: igidttam
11 Replies

4. Solaris

calculate sum size of files by date (arg list too long)

Hi, I wanted a script to find sum of files for a particular date, below is my script ls -lrt *.req | nawk '$6 == "Aug"' | nawk '$7 == "1"'| awk '{sum = sum + $5} END {print sum}' However, i get the error below /usr/bin/ls: arg list too long How do i fix that. Many thanks before. (2 Replies)
Discussion started by: beginningDBA
2 Replies

5. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

6. Shell Programming and Scripting

Shell script to calculate the size of files

Dear all, Please help me to write a script that can calculate the size of files. For example: I have a directory which contain thousands of files. I need to know the size of files that their name begin with abc_123 Thank all!! (4 Replies)
Discussion started by: hainguyen1402
4 Replies

7. Shell Programming and Scripting

Calculate byte size of string

Hi, I have task to merge multiple XML's to one big XML. In doing this i have to calculate the byte size of each XML which i will be recieving as a string from a code and append all the recieved XML's to single file. The reason being the byte size and the offset will help me to extract only... (7 Replies)
Discussion started by: chetan.c
7 Replies

8. Shell Programming and Scripting

Find a particular directory in multiple file systems and calculate total size

Hello : I need some help in writing a ksh script which will find a particular directory in all the file systems in a server and finally report the total size of the direcotry in all the file systems. Some thing like this.. find /u*/app/oracle -type d -name "product" -prune and then... (1 Reply)
Discussion started by: Sam1974
1 Replies

9. Programming

[c] How to calculate size of the file from size of the buffer?

Hi, Can I find size of the file from size of the buffer written? nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie); Thank You :) (1 Reply)
Discussion started by: ezee
1 Replies

10. Red Hat

Du -sh command taking time to calculate the big size files

Hi , My linux server is taking more time to calculate big size from long time. * i am accessing server through ssh * commands # - du -sh * #du -sh * | sort -n | grep G Please guide me for fast way to find big size directories under to / partition Thanks (8 Replies)
Discussion started by: Nats
8 Replies
userdbck(1M)															      userdbck(1M)

NAME
userdbck - verify or fix information in the user database, /var/adm/userdb SYNOPSIS
[file] DESCRIPTION
verifies the information in the user database reports inconsistencies, and fixes problems. If no options and no arguments are specified, reports all data corruption problems in all files in If the option is also specified, each reported problem is repaired. If a file argument (hex 00-ff) is specified, only that file in the directory is verified. Options The following options are recognized: Verify attributes. Information in is used to report any attribute that is not valid, not allowed in the user database, has an invalid value, or is allowed only for a local user and the user is not in Normally when the user database is disabled (see userdb(4)), immediately exits without verifying or repairing the database. The option overrides this and forces to verify or repair the database. Verify user names. User names found in the database are reported if they do not exist in any of the repositories defined in This option could take a long time on a system with many users. Repair all data corruption problems that are found. If this option is not specified, problems are reported but not repaired. Notes Only users who have read and write access to can run RETURN VALUE
exits with one of the following values: success: no inconsistencies were found inconsistencies were found and fixed invalid usage database is disabled; see userdb(4) inconsistencies were found but not fixed, because the option was not specified a problem was found that could not be fixed EXAMPLES
In the following example, all problems in the user database are reported but not repaired. In the following example, all problems in file are reported and repaired. FILES
user database security defaults configuration file security attributes description file SEE ALSO
userdbget(1M), userdbset(1M), userdb_read(3), security(4), userdb(4). userdbck(1M)
All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy