Sponsored Content
Special Forums UNIX Desktop Questions & Answers how to display paths of files in a directory Post 302345633 by scripter.online on Wednesday 19th of August 2009 07:08:28 PM
Old 08-19-2009
Hi,

Code:
 

$ find ./testdir -print
./testdir
./testdir/Count
./testdir/testdir.sh
./testdir/SQL
./testdir/filevalid.sh
./testdir/.hidden1
$

$ ls -ld testdir
drwxr-xr-x    6 scripter     scripterworld       4096 Aug 20 00:50 testdir
$ ls -l testdir
total 24
drwxr-xr-x    2 scripter     scripterworld       4096 Aug 19 20:16 Count
-rwxr-xr-x    1 scripter     scripterworld        342 Aug 19 23:15 filevalid.sh
drwxr-xr-x    2 scripter     scripterworld       4096 Aug 19 20:16 SQL
-rw-r--r--    1 scripter     scripterworld        307 Aug 19 20:15 testdir.sh
$ cd testdir/
$ ls -ltr
total 24
-rw-r--r--    1 scripter     scripterworld        307 Aug 19 20:15 testdir.sh
drwxr-xr-x    2 scripter     scripterworld       4096 Aug 19 20:16 Count
drwxr-xr-x    2 scripter     scripterworld       4096 Aug 19 20:16 SQL
-rwxr-xr-x    1 scripter     scripterworld        342 Aug 19 23:15 filevalid.sh
$

ls -l command with directoryname displays files in that directory

Scripter
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tail-alike display of new files in directory

The system I work on, produces several kinds of status-files in a single directory. I would like to be able to see the files as they are added to this directory. I was wondering if it would be possible to get a "tail -f" alike view of the ls-command, in such a way that a newly added file is... (4 Replies)
Discussion started by: rschelkers
4 Replies

2. Solaris

find home directory paths for all users

How to find al the user's home directories? (2 Replies)
Discussion started by: a2156z
2 Replies

3. UNIX for Dummies Questions & Answers

Find files and display only directory list containing those files

I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file. I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies

4. UNIX for Dummies Questions & Answers

cat a list of directory paths only to a file

Hi! I would like to funnel a series of directories and subdirectories into a text file. This is the output I would like to see from a find command: /mypath/ABC_01/VISIT_01 /mypath/ABC_01/VISIT_02 /mypath/ABC_01/VISIT_03 /mypath/ABC_02/VISIT_01 /mypath/ABC_03/VISIT_01 I've tried: find... (2 Replies)
Discussion started by: goodbenito
2 Replies

5. Shell Programming and Scripting

Unable to export Directory paths through Script

Following is the output of .profile file - $ cat /home/estdm2/.profile #!/bin/ksh set -o vi alias l="ls -ltr" umask 002 Following is the path setting script. $ cat DM_ENV_VARS_NEW.ksh #!/bin/ksh . /home/estdm2/.profile sEnv=$1 echo "We are in ${sEnv} environment" echo "STEP010... (3 Replies)
Discussion started by: sumeet
3 Replies

6. Shell Programming and Scripting

Awk to replace directory paths

Hi all, I have written a bash script to do a few things for my Splunk deployment, however, I am currently stuck on one part... I need to the current working directory (I collect this with `pwd`) in the script as it could in theory be run from a number of locations. I'm not that great with... (5 Replies)
Discussion started by: TauntaunHerder
5 Replies

7. Solaris

Display the number of files in a directory and recursively in each subdirectory

Display the number of files in a directory and recursively in each subdirectory To look something like below, for example /var 35 /var/tmp 56 /var/adm 46 Any ideas how can we do this? :wall: (1 Reply)
Discussion started by: jakerock
1 Replies

8. Solaris

Display the number of files in a directory and recursively in each subdirectory

Display the number of files in a directory and recursively in each subdirectory To look something like below, for example /var 35 /var/tmp 56 /var/adm 46Any ideas how can we do this? Got a sun cluser global mount point which takes ages to mount everytime, need to understand... (5 Replies)
Discussion started by: jakerock
5 Replies

9. Shell Programming and Scripting

Replace directory paths in multiple files at once

I need to update about 2400 files in a directory subtree, with a new directory path inside the files I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2 with this: /u01/PROD/apps/apps_st/10.1.3 I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies

10. Web Development

Apache2 does not display files inside directory

Hello, I have been running Ubuntu14.04 + apache2. 000-default.conf: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory... (5 Replies)
Discussion started by: baris35
5 Replies
GNULIB-TOOL(1)						      GNU Portability Library						    GNULIB-TOOL(1)

NAME
gnulib-tool - program for authors or maintainers which want to import modules from gnulib into their packages. SYNOPSIS
gnulib-tool --list gnulib-tool --import [module1 ... moduleN] gnulib-tool --update gnulib-tool --create-testdir --dir=directory module1 ... moduleN gnulib-tool --create-megatestdir --dir=directory [module1 ... moduleN] gnulib-tool --test --dir=directory module1 ... moduleN gnulib-tool --megatest --dir=directory [module1 ... moduleN] gnulib-tool --extract-description module gnulib-tool --extract-filelist module gnulib-tool --extract-dependencies module gnulib-tool --extract-autoconf-snippet module gnulib-tool --extract-automake-snippet module gnulib-tool --extract-include-directive module gnulib-tool --extract-license module gnulib-tool --extract-maintainer module gnulib-tool --extract-tests-module module DESCRIPTION
The GNU portability library is a macro system and C declarations and definitions for commonly-used API elements and abstracted system behaviors. It can be used to improve portability and other functionality in your programs. OPTIONS
Operation modes: --list print the available module names. --import import the given modules into the current package; if no modules are specified, update the current package from the current gnulib. --update update the current package, restore files omitted from CVS. --create-testdir create a scratch package with the given modules. --create-megatestdir create a mega scratch package with the given modules one by one and all together. --test test the combination of the given modules (recommended to use CC="gcc -Wall" here). --megatest test the given modules one by one and all together (recommended to use CC="gcc -Wall" here). --extract-description extract the description. --extract-filelist extract the list of files. --extract-dependencies extract the dependencies. --extract-autoconf-snippet extract the snippet for configure.ac. --extract-automake-snippet extract the snippet for lib/Makefile.am. --extract-include-directive extract the #include directive. --extract-license report the license terms of the source files under lib/. --extract-maintainer report the maintainer(s) inside gnulib. --extract-tests-module report the unit test module, if it exists. Options: --dir=DIRECTORY specify the target directory. For --import, this specifies where your configure.ac can be found. Defaults to current directory. --lib=LIBRARY Specify the library name. Defaults to 'libgnu'. --source-base=DIRECTORY Directory relative --dir where source code is placed (default "lib"), for --import. --m4-base=DIRECTORY Directory relative --dir where *.m4 macros are placed (default "m4"), for --import. --tests-base=DIRECTORY Directory relative --dir where unit tests are placed (default "tests"), for --import. --aux-dir=DIRECTORY Directory relative --dir where auxiliary build tools are placed (default "build-aux"). --with-tests Include unit tests for the included modules. --avoid=MODULE Avoid including the given MODULE. Useful if you have code that provides equivalent functionality. This option can be repeated. --lgpl Abort if modules aren't available under the LGPL. Also modify license template from GPL to LGPL. --libtool Use libtool rules, for --import. --macro-prefix=PREFIX Specify the prefix of the macros 'gl_EARLY' and 'gl_INIT'. Default is 'gl'. --no-changelog don't update or create ChangeLog files. --dry-run For --import, only print what would have been done. -s, --symbolic, --symlink Make symbolic links instead of copying files. -h, --help Show summary of options. BUGS
Report bugs to <bug-gnulib@gnu.org>. SEE ALSO
check-module(1). AUTHOR
gnulib was written by the Free Software Foundation and others (sources of various origins). This manual page was written by Daniel Baumann <daniel@debian.org>, for the Debian project (but may be used by others). 0.0.20060601 2006-06-01 GNULIB-TOOL(1)
All times are GMT -4. The time now is 03:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy