07-14-2010
Print directory name along with their path
Can any one tell me that how can i print all directory with their path in a given parent directory.
i.e. parent directory /home/usr/
Now this shoe directory may contain sevral directory
/home/usr
dir1/
dir1.1/
dir1.2/
dir2
dir2.1/
dir2.2/
dir2.2.1/
dir2.2.1.1/
and so on.
Now output should be each directory name along with path i.e
/home/usr/dir1/
/home/usr/dir1/dir1.1/
/home/usr/dir1/dir1.2/
/home/usr/dir2/dir2.1/
/home/usr/dir2/dir2.2/dir2.2.1/
/home/usr/dir2/dir2.2/dir2.2.1/dir2.2.1.1/
Any kind of help will be appricated.
Please let me know if i am not clear
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello simple question :
how can i split the $PATH by the ":" seperator with one liner ?
mybe using awk is there any builtin function in awk that splits and prints the output ?
thanks (2 Replies)
Discussion started by: umen
2 Replies
2. Shell Programming and Scripting
I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?
for FILE in `cat list`; do
if ;
then
... (1 Reply)
Discussion started by: overkill
1 Replies
3. 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
4. Shell Programming and Scripting
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies
5. Shell Programming and Scripting
hi,
i have a directory at /path/unix with the following files
1.txt
2.txt
3.txt
4.txt
I want to make another file called filenames.txt at a different location called /path/home. So, my output file would be
/path/home/filenames.txt with contents
/path/unix/1.txt... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
6. Shell Programming and Scripting
Hello, stumped with the find command to show the final path of subdirectories.
Used the command
find /dir1 -type d
Output:
/dir1/dirA
/dir1/dirA/dirB
/dir1/dirA/dirB/dirC
Desired output is:
/dir1/dirA/dirB/dirC
Please help with awk statement or find syntax. Thanks in... (6 Replies)
Discussion started by: ux4me
6 Replies
7. UNIX for Dummies Questions & Answers
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
8. UNIX for Advanced & Expert Users
Hi,
So I struggled to find a solution to the following problem:
I want to make sed print only part of multiple different paths.
So lets say we have
/path/path1/path2/logs/bla/blabla
/path/path1/path2/path3/logs/yadda/yadda/yadda
Can someone suggest a way to make sed or other... (5 Replies)
Discussion started by: dampio
5 Replies
9. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
10. UNIX for Beginners Questions & Answers
What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
LEARN ABOUT DEBIAN
icmstart.rc
icmstart.rc(7) icmstart resource file icmstart.rc(7)
NAME
icmstart.rc - The icmstart(1) resource file
DESCRIPTION
The icmstart.rc file defines the initial files of a program that are installed by icmstart(1).
By default icmstart.rc is found in /etc/icmake/icmstart.rc, but if a file $HOME/.icmake/icmstart.rc is found then the latter file is used
by icmstart(1). $HOME/.icmake/icmstart.rc in turn is overruled by specifying a -c option when invoking icmstart(1).
The default resource file contains the following specifications, preparing for the construction of a C++ program using icmbuild(1):
CLASSES
P main.cc
P main.ih
P usage.cc
P version.cc
P ? scanner
P ? parser
The icmstart.rc file may contain:
o empty lines, which are ignored;
o lines beginning with a hash-character (#), also ignored;
o Optionally: a P (don't install with icmstart xxx library) or an L (don't install with icmstart xxx program), followed by a blank;
see also icmstart(1).
o Optionall: a ? (followed by a blank) following the optional P or L in which case the installation of the element must be confirmed
by the user.
o Source path names. Relative path names are interpreted relative to the current working directory. Environment variables are not
expanded, the initial tilde character is interpreset as the user's home directory.
o Source path names followed by a destination (relative to the directory initialized by icmstart(1)). A source path may be either a
file or a directory. If a directory is specified then all files in and below that directory will be installed.
When specifying a destination a path may be specified as well. However, the destination path is always interpreted relative to the instal-
lation directory specified when calling icmstart(1).
If a destination is omitted, the source is installed as specified below icmstart(1)'s destination directory.
EXAMPLES
The following entries can be used in an icmstart.rc file:
o source
`Source' must be in the skeleton directory visited by icmstart(1) and is installed as source in the destination directory specified
when calling icmstart(1).
o source dest
`Source' must be in the skeleton directory visited by icmstart(1) and is installed as dest in the destination directory specified
when calling icmstart(1).
o ~/path
`~/path' is installed as ~/path in the destination directory specified when calling icmstart(1). The ~-character is expanded to the
user's home directory.
o ~/path dest
`~/path' is installed as dest in the destination directory specified when calling icmstart(1). The ~-characteris expanded to the
user's home directory.
o /path
`/path' is installed as ./path in the destination directory specified when calling icmstart(1).
o /path dest
`/path' is installed as dest in the destination directory
o ? source
The user must confirm the installation of source.
o ? source dest
The user must confirm the installation of source as dest in the destination directory specified when calling icmstart(1).
o # text
Interpreted as comment and ignored. The #-character must be the first character on the line.
o an empty line
Empty lines are skipped.
FILES
The mentioned paths are sugestive only and may be installation dependent:
o /usr/share/icmake/icmconf Example of an icmbuild configuration file;
o /usr/share/icmake/CLASSES Example of an icmbuild CLASSES file.
o /usr/share/icmake/icmstart.rc Default skeleton resource file.
SEE ALSO
icmake(1), icmbuild(1), icmconf(7), icmstart(1)
BUGS
None reported
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
icmake.7.18.00.tar.gz 1992-2012 icmstart.rc(7)