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