05-09-2012
How to list all Subdirectories and files with its full path in a parent directory?
How to list all Subdirectories and files with its full path in a parent directory?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to find the largest files in a directory & it's subdirectories.
I'm not sure what options on ls -l will work to give me this. or is there another way to do this?
Thanks,
igidttam (6 Replies)
Discussion started by: igidttam
6 Replies
2. UNIX for Advanced & Expert Users
How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it?
example.
/
...
...
...
/etc/inetd.conf
/etc/passwd
/etc/shadow
...
...
...
/var/adm/messages
/var/adm/messages.0
/var/adm/messages.1
...
...
...... (4 Replies)
Discussion started by: Sowser
4 Replies
3. UNIX for Dummies Questions & Answers
Hi
I am writing a script to find the list of files in dir1 and my script is place in dir2
while doing ls of files dir1 it is displaying with path. I would like to omit the path and display the only file name so that I can pass it to my script as arguments.
for filename in ... (2 Replies)
Discussion started by: madankumar
2 Replies
4. Shell Programming and Scripting
hi experts(novice people can stay away as it is no child's game),
i am developing a script which works like recycle bin of windows.
the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies
5. Shell Programming and Scripting
Hi all,
How to save file full name to a file. I tried the following but don't know to include path name.
$ ls -l | awk '{print $9}' > outputfile.dat
$ cat outputfile.dat
fifth.txt
first.txt
fourth.txt
second.txt
third.txt
My wanted result is ie:
... (3 Replies)
Discussion started by: mr_bold
3 Replies
6. Shell Programming and Scripting
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies
7. Shell Programming and Scripting
Hi,
I am not too familiar with Unix scripting but I have to write code to find all the files under all the sub directories under a parent directory of unix location and move them to the corresponding Windows location.
For eg: I have \home\sreenu\Files\
Under neath this I have multiple sub... (3 Replies)
Discussion started by: raj.sreenu
3 Replies
8. Shell Programming and Scripting
I need to write a script to :
list files with *.i extension in a directory and all its subdirectories + 30days old, save it in a file and then remove (2 Replies)
Discussion started by: lena keung
2 Replies
9. Shell Programming and Scripting
Hi All,
requirement is to find and remove the files from sub directories but it should exclude the files from parent directory.
At present i am using the below one but it finds and remove files from both parent and sub directories.
find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies
10. Shell Programming and Scripting
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies
rmdir(2) System Calls Manual rmdir(2)
NAME
rmdir() - remove a directory file
SYNOPSIS
DESCRIPTION
The system call removes a directory file whose name is given by path. The directory must be empty (except for the files and before it can
be removed.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
If fails, is set to one of the following values.
[EACCES] A component of the path prefix denies search permission.
[EACCES] Write permission is denied on the directory containing the link to be removed.
[EACCES] The process does not have read/write access permission to the parent directory.
[EBUSY] The directory to be removed is the mount point for a mounted file system.
[EBUSY] The path is the current working directory.
[EEXIST] The named directory is not empty. It contains files other than and
[EFAULT] path points outside the process's allocated address space. The reliable detection of this error is implementation-
dependent.
[ELOOP] Too many symbolic links were encountered in translating the path name.
[ENAMETOOLONG] The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes
while is in effect.
[ENOENT] The named file does not exist.
[ENOTDIR] A component of the path is not a directory.
[EPERM] The directory containing the directory to be removed has the sticky bit set and neither the containing directory nor
the directory to be removed are owned by the effective user ID.
[EROFS] The directory entry to be removed resides on a read-only file system.
AUTHOR
was developed by the University of California, Berkeley and HP.
SEE ALSO
mkdir(2), unlink(2), remove(3C), privileges(5).
STANDARDS CONFORMANCE
rmdir(2)