Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lfc_getcwd(3) [debian man page]

LFC_GETCWD(3)						       LFC Library Functions						     LFC_GETCWD(3)

NAME
lfc_getcwd - get LFC current directory used by the name server SYNOPSIS
#include <sys/types.h> #include "lfc_api.h" char *lfc_getcwd (char *buf, int size) DESCRIPTION
lfc_getcwd gets the LFC 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, lfc_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
lfc_chdir(3) AUTHOR
LCG Grid Deployment Team LFC
$Date: 2001/10/04 12:12:44 $ LFC_GETCWD(3)

Check Out this Related Man Page

LFC_OPENDIR(3)						       LFC Library Functions						    LFC_OPENDIR(3)

NAME
lfc_opendir - open a LFC directory in the name server SYNOPSIS
#include <sys/types.h> #include "lfc_api.h" lfc_DIR *lfc_opendir (const char *path) DESCRIPTION
lfc_opendir opens a LFC directory in the name server to be used in subsequent lfc_readdir operations. A lfc_DIR structure and a buffer to cache the directory entries are allocated in the client API. path specifies the logical pathname relative to the current LFC directory or the full LFC pathname. RETURN VALUE
This routine returns a pointer to be used in the subsequent directory function calls if the operation was successful or NULL if the opera- tion failed. In the latter case, serrno is set appropriately. ERRORS
ENOENT A component of path prefix does not exist or path is a null pathname. EACCES Search permission is denied on a component of the path prefix or read permission is denied on path. EFAULT path is a NULL pointer. ENOTDIR A component of path prefix is not a directory. 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), lfc_chdir(3), lfc_closedir(3), lfc_readdir(3), lfc_readdirg(3), lfc_rewinddir(3) AUTHOR
LCG Grid Deployment Team LFC
$Date: 2001/10/04 12:12:46 $ LFC_OPENDIR(3)
Man Page

13 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

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

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

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

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

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

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

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