Hi all,
I've got a problem, what function do i use to list the contents of all the directory tree (simular to "find")? Any other suggestions?
Thank you all (3 Replies)
I wanted to search in all the sub directories under /vob/project (recurse) in everything inside /vob/project.
search.run
for x in `cat search.strings`
do
find /vob/project -type f -print | xargs grep -i $x > ~/$x.txt
done
search.string
hello
whoami
I am getting the error ... (5 Replies)
Dear All,
I am new to Unix and i need a small Help from you Guys.....
The current structure of my system is as follows:
/Abc/xyz/cpd/std/re/doc
Each cpd directory has n number of std's. Each std has n number of re's.
My requirement is to write a UNIX script that would search... (0 Replies)
Dear All,
I am new to Unix and i need a small Help from you Guys.....
The current structure of my system is as follows:
/Abc/xyz/cpd/std/re/doc
Each cpd directory has n number of std's. Each std has n number of re's.
My requirement is to write a UNIX script that would search whether doc... (8 Replies)
Hi,
I'm very new to shell script. Try to search a directory named construction using : find construction -type d.
but don't know the path. so it can not stat.
want to return the path of directory construction.
can anyone help me. (4 Replies)
Hi! All,
I am new here...
Hello to all!!!!!!!!
I want to know how to know files present in the directory.
i do not want direcory name in the directory? (5 Replies)
Hi, i need help on how to do this:
to make a shell script that reads 2 parameters in command line, one directory and pattern. Then it must search for the string in all files starting from the indicated directory (including subfolders) and excluding binary files.
The results should show the... (1 Reply)
I am trying to do the following task :
export ENV=aaa
export ENV_PATH=$(cd /apps | ls | grep $ENV)
However, it's not working. What's the way to change to directory and search some file in that directory in single command
Please help. (2 Replies)
Hello Everyone,
I need to find the file / directory with the maximum timestamp in a directory tree having many files / directories.
Could you please help.
Thanks,
H squared (3 Replies)
Discussion started by: H squared
3 Replies
LEARN ABOUT CENTOS
rmdir
RMDIR(2) Linux Programmer's Manual RMDIR(2)NAME
rmdir - delete a directory
SYNOPSIS
#include <unistd.h>
int rmdir(const char *pathname);
DESCRIPTION
rmdir() deletes a directory, which must be empty.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EACCES Write access to the directory containing pathname was not allowed, or one of the directories in the path prefix of pathname did not
allow search permission. (See also path_resolution(7).
EBUSY pathname is currently in use by the system or some process that prevents its removal. On Linux this means pathname is currently
used as a mount point or is the root directory of the calling process.
EFAULT pathname points outside your accessible address space.
EINVAL pathname has . as last component.
ELOOP Too many symbolic links were encountered in resolving pathname.
ENAMETOOLONG
pathname was too long.
ENOENT A directory component in pathname does not exist or is a dangling symbolic link.
ENOMEM Insufficient kernel memory was available.
ENOTDIR
pathname, or a component used as a directory in pathname, is not, in fact, a directory.
ENOTEMPTY
pathname contains entries other than . and .. ; or, pathname has .. as its final component. POSIX.1-2001 also allows EEXIST for
this condition.
EPERM The directory containing pathname has the sticky bit (S_ISVTX) set and the process's effective user ID is neither the user ID of the
file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the CAP_FOWNER
capability).
EPERM The file system containing pathname does not support the removal of directories.
EROFS pathname refers to a directory on a read-only file system.
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
BUGS
Infelicities in the protocol underlying NFS can cause the unexpected disappearance of directories which are still being used.
SEE ALSO rm(1), rmdir(1), chdir(2), chmod(2), mkdir(2), rename(2), unlink(2), unlinkat(2)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-05-08 RMDIR(2)