DPNS_GETCWD(3) DPNS Library Functions DPNS_GETCWD(3)NAME
dpns_getcwd - get DPNS current directory used by the name server
SYNOPSIS
#include <sys/types.h>
#include "dpns_api.h"
char *dpns_getcwd (char *buf, int size)
DESCRIPTION
dpns_getcwd gets the DPNS current directory used by the name server. This current working directory is stored in a thread-safe variable in
the client.
If buf is not NULL, the current directory name will be stored there.
If buf is NULL, dpns_getcwd allocates a buffer of size bytes using malloc.
size must be at least the length of the directory name to be returned plus one byte.
RETURN VALUE
This routine returns buf if the operation was successful or NULL if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
ENOENT The current directory has not been set yet or does not exist anymore.
ENOMEM buf is a NULL pointer and memory could not be allocated.
EINVAL size is less than or equal to zero.
ERANGE size is greater than 0 and less than size of current directory name plus 1.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
ENSNACT Name server is not running or is being shutdown.
SEE ALSO dpns_chdir(3)AUTHOR
LCG Grid Deployment Team
DPNS $Date: 2001/10/04 12:12:44 $ DPNS_GETCWD(3)
Check Out this Related Man Page
DPNS_READLINK(3) DPNS Library Functions DPNS_READLINK(3)NAME
dpns_readlink - read value of a symbolic link in the DPNS Name Server
SYNOPSIS
#include <sys/types.h>
#include "dpns_api.h"
int dpns_readlink (const char *path, char *buf, size_t bufsiz)
DESCRIPTION
dpns_readlink reads the value of a symbolic link in the DPNS Name Server.
path specifies the link name relative to the current DPNS directory or the full DPNS pathname.
buf points at a buffer to receive the value.
bufsiz gives the buffer size.
RETURN VALUE
This routine returns the number of characters put in the buffer if the operation was successful or -1 if the operation failed. In the lat-
ter case, serrno is set appropriately.
ERRORS
ENOENT The named link does not exist or is a null pathname.
EACCES Search permission is denied on a component of the path prefix.
EFAULT path or buf is a NULL pointer.
ENOTDIR A component of path prefix is not a directory.
EINVAL path is not a symbolic link.
ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
ENSNACT Name server is not running or is being shutdown.
SEE ALSO Castor_limits(4), dpns_chdir(3), dpns_stat(3), dpns_statg(3), dpns_symlink(3)AUTHOR
LCG Grid Deployment Team
DPNS $Date: 2004/06/28 09:46:55 $ DPNS_READLINK(3)
hai friends
I need a program to find the size of a directory.. When i tried to get the size, it always gives the default space allocated for it. How can i findout the exact size of a directory using a c program
Thanks in advance
Collins (6 Replies)
Hi,
How can find the size of the directory. If the directory has 1000 files. I want the total size of directory including all the files. the bdf command is just able to give only the volume size. It is not heling my cause. (2 Replies)
am I right in assuming that in unix a directory size is just information about that directory stored somewhere on the file system, and not a sum of its contents? This is because ls -l gives 1024 as my directory size, when the directory contains many gigs worth of stuff.
also, is
du -sk dir ... (2 Replies)
Hi All,
I have a requirement like below,
I want to transfer few file of size > 5 Mb from one directory to anotehr directory. Please let me know the command how can i do that
Sorry if it looks silly
Senthil (6 Replies)
Hi All,
I am new to unix scripting, please help me in completing this exercise,
I have a scenario as follows,
1. i have a text file(snapshot.txt) consisting of directory names, and file
size separated by comma as shown below:
snapshot.txt data:
... (1 Reply)
Hi all,
Is there any built in function that can display the content of a directory showing the size of directories?
I want to see the content of a directory without recursion. I don't want to see the content of all subdirectories.
I want to see the contained files with their size and the... (6 Replies)
Hi Team,
I am a new bie to unix and want to check a directory for a files with extension *.doc exceeding a specific file size limit,and will give me a buffer ooutput as below
I used below command,
find . -name \*.doc -size +3k -printf "|%p |%k KB"
which resulted as,
./ABC_sw_high.doc ... (1 Reply)
Hello world,
I just learnt we can create a directory with custom size in a Linux server (say Redhat). Is it true? I'm asking because the only data (I can think of) a directory's inode holds is the files and 'sub-dir's. How can a new empty directory be of some required size? :wall:
PS : In... (2 Replies)
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)
Is there any command that can list out all the files size including directory in 1 command?
`ls` will only give 2048 for a directory, which i'm looking for the actual size. (5 Replies)
Hi,
Is there a way to find out the size of a sub-directory?
Eg subidrectory in main directory /data, like this : /data/solr-5.3.1.
When I do a df -h /data/solr-5.3.1, it still gives the size of /data:
root@L28condor:/data/solr-5.3.1# df -h .
Filesystem Size Used... (1 Reply)