Sponsored Content
Top Forums Shell Programming and Scripting How to check total files size in hdfs directory? Post 303018586 by panyam on Monday 11th of June 2018 05:09:10 AM
Old 06-11-2018
Code:
I dont want to use du/df command. Without that is there a way

Why ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check if 3 files have same size in directory

I need to determine if any three files have the same file size in a specified directly? I have got as far as listing the file sizes but where to go from here? ls -al |sort -n -r +4 | awq '{print $5}' Thanks in anticipation (5 Replies)
Discussion started by: oggle
5 Replies

2. HP-UX

total size taken by directory

HI ALL, i am a beginner in unix world. can anyone please tell me the way to find total size taken by each directory (including size of all subdirectories and files) present under /var. e.g what is space occupied by /var/adm , /var/admin etc. its a simple question but still i dont know the... (2 Replies)
Discussion started by: jyoti
2 Replies

3. UNIX for Dummies Questions & Answers

Find total size for some files?

Hi, I'm newbie to Unix. I'd like to count the total size of those files in my directory by date. For example, files on this period 05/01/08 - 05/31/08. If possible can we count by byte instead of kb. if I use $ du - ks , it will add up all files in the dir. thanks, Helen (5 Replies)
Discussion started by: helen008
5 Replies

4. Shell Programming and Scripting

Getting the total file size for certain files per directory

Hi, I am trying to get the total file size for certain files per directory. I am using find /DirectoryPath -name '*.dta' -exec ls -l {} \; | awk '{ print $NF ": " $5 }' > /users/cergun/My\ Documents/dtafiles.txt but this lists all the files in the directories. I need the total... (9 Replies)
Discussion started by: cergun
9 Replies

5. UNIX for Dummies Questions & Answers

get total size of files

as we use du - sh *.frm In This command It will show the list of files and size But I want the Total size that these files in directory with extension .frm How can we do This (6 Replies)
Discussion started by: kaushik02018
6 Replies

6. Shell Programming and Scripting

Use Awk and Array to get total size of files

Hello all, I need to do scripts total up the size in selected extension file for example motion.mov and segmentation.avi is in Label Media. For file info.doc and calc.xls in Label Document. I need output will be like this: count 1 Media,,2 GB count 2 Document,,4 GB My problem is,... (16 Replies)
Discussion started by: sheikh76
16 Replies

7. Shell Programming and Scripting

Checking the total size of all files from a particular date

Hi I have some set of files for a particular date. What is the command that I need to put in for finding the total size of all the files for that particular date. The following command is fetching me the size of all individual files seperately du -h *20101010* 16M file1.20101010 120K... (10 Replies)
Discussion started by: bobby1015
10 Replies

8. Shell Programming and Scripting

How to delete some of the files in the directory, if the directory size limits the specified size

To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies

9. 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

10. Solaris

Find the total size of multiple files

If I have a number of files in a directory, for example, test.1 test.2 test.3 abc.1 abc.2 abc.3 and I need to find the total file size of all of the test.* files, I can use du -bc test.* in Linux. However, in Solaris, du does not have the -c option. What can I do in Solaris to get... (11 Replies)
Discussion started by: learnix
11 Replies
FS_DISKFREE(1)						       AFS Command Reference						    FS_DISKFREE(1)

NAME
fs_diskfree - Shows data about the partition housing a directory or file SYNOPSIS
fs diskfree [-path <dir/file path>+] [-human] [-help] fs df [-p <dir/file path>+] [-hu] [-he] fs di [-p <dir/file path>+] [-hu] [-he] DESCRIPTION
The fs diskfree command formats and displays information about the partition that houses the volume containing the specified directory or file, including its size and how much space is currently used. To display information about the volume itself, use the fs examine command. The fs examine and fs quota commands also display information about a volume. CAUTIONS
The partition-related statistics in this command's output do not always agree with the corresponding values in the output of the standard UNIX df command. The statistics reported by this command can be up to five minutes old, because the Cache Manager polls the File Server for partition information at that frequency. Also, on some operating systems, the df command's report of partition size includes reserved space not included in this command's calculation, and so is likely to be about 10% larger. OPTIONS
-path <dir/file path>+ Names a file or directory that resides on the partition about which to produce output. Partial pathnames are interpreted relative to the current working directory, which is also the default value if this argument is omitted. -human Print space in a "human-readable" format. Instead of always printing space in kilobytes, show disk space in kilobytes, megabytes, gigabytes, terabytes, or petabytes, as appropriate. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output reports the following information about the volume and partition that houses each file or directory: Volume Name The name of the volume. total The partition's total size. If -human is not specified, this value is in kilobytes. used The amount of space used on the partition. If -human is not specified, this value is in kilobytes. avail The amount of space available on the partition. If -human is not specified, this value is in kilobytes. %used The percentage of the partition's total space that is used (the "used" statistic divided by the "kbytes" statistic, times 100). If the %used statistic is greater than 90%, it is marked with the string "<<WARNING" at the right margin. If the volume is a read-only volume, the output includes information about only one of the partitions that houses it, generally the one on the file server machine with the lowest preference rank. To verify which machine the output is referring to, use the vos listvldb command to list the volume's locations, and the vos partinfo command to display the size of each one. EXAMPLES
The following example shows the output for the partitions housing the volumes "user.smith" and "sun4x_56.bin": % fs diskfree -path /afs/abc.com/usr/smith /afs/abc.com/sun4x_56/bin Volume Name total used avail %used user.smith 4177920 3841258 336662 92% <<WARNING sun4x_56.bin 4423680 3174500 1249180 72% PRIVILEGE REQUIRED
The issuer must have the "r" (read) permission on the ACL of the root directory of the volume that houses the file or directory named by the -path argument, and "l" (list) permission on the ACL of each directory that precedes it in the pathname. SEE ALSO
fs_examine(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_DISKFREE(1)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy