Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dpns_getcwd(3) [debian man page]

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)
Man Page

14 More Discussions You Might Find Interesting

1. Programming

size of a directory

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)
Discussion started by: collins
6 Replies

2. HP-UX

How find size of directory

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)
Discussion started by: truth
2 Replies

3. UNIX for Dummies Questions & Answers

Dummy questions about how to get the size of a directory by command

Hi, 'ls -ld' is no use .... I want to get the total size of a directory. Any advice? Thanks in advance! (4 Replies)
Discussion started by: GCTEII
4 Replies

4. UNIX for Dummies Questions & Answers

directory size with ls -l

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)
Discussion started by: JamesByars
2 Replies

5. UNIX for Dummies Questions & Answers

Cp files (>5 Mb size) from one directory to another

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)
Discussion started by: skcontact
6 Replies

6. UNIX for Dummies Questions & Answers

checking directory size in the text file

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)
Discussion started by: G.K.K
1 Replies

7. UNIX for Dummies Questions & Answers

Display directory size

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)
Discussion started by: chebarbudo
6 Replies

8. UNIX for Dummies Questions & Answers

List size information...

hi all, i want to list only the size information and name of the file(s) and directories in current directory .. (2 Replies)
Discussion started by: sonu_pal
2 Replies

9. HP-UX

how to get the dbsize of a particuular db

hi, how to get the dbsize of a particuular db and also the size of all the db's in a server/dbspace?? (0 Replies)
Discussion started by: dvah
0 Replies

10. Red Hat

Checking File size

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)
Discussion started by: lisha.ahuja
1 Replies

11. UNIX for Dummies Questions & Answers

Creating directory with specific size?

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)
Discussion started by: satish51392111
2 Replies

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

13. UNIX for Dummies Questions & Answers

Command to list our directory size

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)
Discussion started by: lsy
5 Replies

14. Debian

Finding out size of sub-directory

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)
Discussion started by: anaigini45
1 Replies