Listing filesnames in bare format with fullpath


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Listing filesnames in bare format with fullpath
# 1  
Old 01-26-2007
MySQL Listing filesnames in bare format with fullpath

Hi,
Need help. How can I get a listing of files in bare format with full path. I mean in the following format.

/root/dir1/sub-dir1/file1
/root/dir1/sub-dir1/file2
/root/dir1/sub-dir2/file1
/root/dir1/sub-dir2/file2
/root/dir2/sub-dir1/file1
/root/dir2/sub-dir2/file1
/root/dir2/sub-dir2/file2

and so on...

Please advice. Thanks in advance.

Regards,
Tipsy.
# 2  
Old 01-26-2007
I guess this should work. Let me know if you have a better way to do it.

find . -type f

Regards,
Tipsy.
# 3  
Old 01-26-2007
# All files in the current directory and subdirectories
find . -type f | sed -e "s@^\.@$PWD@"
# All files in the current directory (no subdirectories)
find ./* -prune -type f | sed -e "s@^\.@$PWD@"
# All files on your system
find / -type f
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to generate HTML output format listing like orasnap

Hi, Is there any UNIX scripts out there that generates a listing output of some sort similar to OraSnap At the moment, I have a script that I run on multiple servers that has multiple databases and just querying the database sizes of those databases. It generates a text files that contains... (0 Replies)
Discussion started by: newbie_01
0 Replies

2. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

Hi, My apologies if my query is already available on this forum but I am new and could not find. I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this? ... (4 Replies)
Discussion started by: 8709711
4 Replies

3. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies

4. Shell Programming and Scripting

modify ls -l (long listing format output) strictly using SED only straightforward goalhard 4 me doh

Below is a sample out of ls -l which I would like to rearrange or modify by field numbers for example I successfully managed to disect using simple paragraph however for ls -l I can't divide the rows or fields by field number. Successful modification by fields using SED sample: $ sed -e... (1 Reply)
Discussion started by: wolf@=NK
1 Replies

5. Shell Programming and Scripting

Listing files in a particular format

Hi, My unix version is as follows: uame -a HP-UX server-name B.11.11 U 9000/800 2329770924 unlimited-user license I just want to get file listing is a particular format listed below. name permission set(octal) size date (mon dd, yyyy) I am trying to use the following command. ... (14 Replies)
Discussion started by: manubatham20
14 Replies

6. Shell Programming and Scripting

How to get filename from the fullpath and how to grep multiple strings

Hi, New to shell scripting.... I have log file content as below: I have to count the number of occurences of ERROR or INFO Messages. So, I cut 5 th column and uniquly sorted and redirected it to new.txt file. But I want copy to S*/Filename and T*/Filename of respective ERROR or INFO... (5 Replies)
Discussion started by: Shirisha
5 Replies

7. Shell Programming and Scripting

listing file with other format

Hello. If i use ls to list file, the output will be like this: ls list* list1.txt list2.txt list3.txt list4.txt list5.txt How can I list file like below (I tried to us ls -ltr list*.txt, but all of them with time, date in font of the file...but I don't need it)? list1.txt... (3 Replies)
Discussion started by: happyv
3 Replies

8. UNIX for Advanced & Expert Users

Unix Commands to display the Filesnames

Query: In a directory there are 20 files, I have to display the Filenames which contains the content as JAVA in any line of the file. Please tell me the command or commands. (3 Replies)
Discussion started by: kish_kk84
3 Replies

9. UNIX for Dummies Questions & Answers

Extracting Filename from Fullpath

Hi, Any help on this would be very appreciated. I capture the full path & filename in a variable like (varFile=/home/user/extfile.txt). Now in my shell script I have to use only the filename part i.e. extfile.txt. How do I extract only the filename part from the variable? Thanks in... (3 Replies)
Discussion started by: njoshi
3 Replies

10. UNIX for Dummies Questions & Answers

O S for new bare PC

I have a new motherboard & HD etc that have working bios etc but won't accept my W98 upgrade as the O S, I need to know if I can get the Unix OS to work with it, instead of using Windows? I understand that the Unix OS works very well but will it install easily?? Al (5 Replies)
Discussion started by: Alrichards
5 Replies
Login or Register to Ask a Question