08-30-2016
Please be aware that df prints results for file systems, NOT directories.
Is df aliased to sth. different on your linux system? On my system, your pipe in post#1 works as desired...
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How would I go about finding the about of disk space occupied by a certain directory?
For example, /u1/cvera => 530 MB
Thanks =) (3 Replies)
Discussion started by: cvera8
3 Replies
2. Shell Programming and Scripting
Hi,
I have just written a script in /bin/bash, however, l want to test if character is a carriage return or space. Also l want my script to be able to detect my disk space and send a mail if usage is more than 90% or send an alert.
Thanks
Kayode (6 Replies)
Discussion started by: kayode
6 Replies
3. UNIX for Dummies Questions & Answers
how can we determine the disk space
used by a certain directory? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
4. Shell Programming and Scripting
Some times my disk space is used upto 100% due to the application logs .
So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Discussion started by: amitranjansahu
2 Replies
5. Shell Programming and Scripting
Hi all,
FreeBSD7.1 @ sh.
In a backup script I am trying to get the blocks used by the backup once completed.
I am using the function:
#!/bin/sh
spaceused()
{
du -d 0 "${1}" | awk -F"+" '{ print $1 }
}
to return the blocks used of said directory and contents.
Via. command line... (7 Replies)
Discussion started by: Festus Hagen
7 Replies
6. UNIX Desktop Questions & Answers
Issue with disk space usage
I have the following line in my "df -h" output:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 496M 495M -39M 109% /
What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Discussion started by: figaro
2 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies
8. Shell Programming and Scripting
Hi All,
I have written a script to check the file system usage and to delete the files which is consuming more space.Please check whether the script is corrcet
#Script Starts here
#!/usr/local/bin/perl
#Program to find the disk space and to delete the older files
#Checks the type of OS... (8 Replies)
Discussion started by: arunkarthick
8 Replies
9. Shell Programming and Scripting
Hi Guys,
Is there any way I can write a script that sends DISK SPACE USAGE STATUS via email once a week?
Thanks, (5 Replies)
Discussion started by: g4v1n
5 Replies
10. Shell Programming and Scripting
hi all members
I have a shell script to generate disk space usage email alert if threshold is more than 80 %, now the requirement changed to keep sending alert emails for every 5% incremental usage ........ Any help would be greatly appreciated.
ex - 80% , 85% ,90%,95%,100% we should get an... (6 Replies)
Discussion started by: anil529
6 Replies
NAMEI(1) User Commands NAMEI(1)
NAME
namei - follow a pathname until a terminal point is found
SYNOPSIS
namei [options] pathname...
DESCRIPTION
namei interprets its arguments as pathnames to any type of Unix file (symlinks, files, directories, and so forth). namei then follows each
pathname until an endpoint is found (a file, a directory, a device node, etc). If it finds a symbolic link, it shows the link, and starts
following it, indenting the output to show the context.
This program is useful for finding "too many levels of symbolic links" problems.
For each line of output, namei uses the following characters to identify the file type found:
f: = the pathname currently being resolved
d = directory
l = symbolic link (both the link and its contents are output)
s = socket
b = block device
c = character device
p = FIFO (named pipe)
- = regular file
? = an error of some kind
namei prints an informative message when the maximum number of symbolic links this system can have has been exceeded.
OPTIONS
-l, --long
Use the long listing format (same as -m -o -v).
-m, --modes
Show the mode bits of each file type in the style of ls(1), for example 'rwxr-xr-x'.
-n, --nosymlinks
Don't follow symlinks.
-o, --owners
Show owner and group name of each file.
-v, --vertical
Vertically align the modes and owners.
-x, --mountpoints
Show mountpoint directories with a 'D' rather than a 'd'.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
AUTHOR
The original namei program was written by Roger Southwick <rogers@amadeus.wr.tek.com>.
The program was rewritten by Karel Zak <kzak@redhat.com>.
BUGS
To be discovered.
SEE ALSO
ls(1), stat(1), symlink(7)
AVAILABILITY
The namei command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/.
util-linux June 2011 NAMEI(1)