Unix file list customisation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix file list customisation
# 1  
Old 06-22-2009
Unix file list customisation

I have a directory ContentAreas
inside that i have many subdirectores
I want the list of all the files inside those sub directories with the complete path

for instance if the file fEthicalRetailOverview.xml is inside the Documents folder LPEthicalRetail

then the the path should come out as -:

/ContentAreas/LPEthicalRetail/Documents

please let me know at my id i possible removed

Last edited by vgersh99; 06-22-2009 at 10:52 AM.. Reason: remoed email address
# 2  
Old 06-22-2009
Hi.

Try this
Code:
ls -1 | awk '{print "'$PWD'/" $1}'

# 3  
Old 06-22-2009
Hello!

In case you forgot to read the forum rules, here is quick copy.

Quote:
RULES OF THE UNIX AND LINUX FORUMS


(1) No flames, shouting (all caps), sarcasm, bullying, profanity or arrogant posts.

(2) No negative comments about others or impolite remarks. Be patient.

(3) Refrain from idle chatter that does not contribute to the knowledge base. This does not apply to the forums in The Unix Lounge which are for off-topic discussions.

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.

(5) Search the forums database with your keywords before asking.

(6) Do not post classroom or homework problems.

(7) No job postings from headhunters or recruiters except in The Unix Forums Job Board. See How to Post to The UNIX Forums Job Board for information on using the Job Board.

(8) No BSD vs. Linux vs. Windows or similar threads.

(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.

(10) Don't post your email address and ask for an email reply. Don't send a private message with a technical question. The forums are for the benefit of all, so all Q&A should take place in the forums.

(11) Post questions with descriptive subjects. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

(12) These are not hacker boards so hacker related posts will be promptly deleted or moderated.

(13) The forum administrators reserve the right to prune, move or edit posts that do not adhere to the rules or are technically inaccurate.

(14) The forum administrators reserve the right to remove users or change their posting status to read only without notice if any rules are not followed.

(15) No smoking in the forums.
Cheers.

The UNIX and Linux Forums
# 4  
Old 06-22-2009
how can i extract all the search results to a notepad?
# 5  
Old 06-22-2009
Phew. Thought I messed up again there.

This is the same thing for a recursive search:

Code:
find . -name file1 | sed -e "s|^.|$PWD|"



---------- Post updated at 09:07 AM ---------- Previous update was at 09:06 AM ----------

Direct the output to a file and VI (or emacs, or whatever) it.
# 6  
Old 06-22-2009
Hi,

Thanks ever so much for you help.Much appreciated.Please could you give me the exact command to extarct these results to a notepad?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need help with UNIX command to get the latest file from list of files with timestamp

Hi All, I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies

2. UNIX for Dummies Questions & Answers

Deletion of list of user based on a text file In LDAP UNIX server

Dear All, It would be really nice, if you could help me to write a script for deletion of list of user( more than 15000 users) stored in a file and sorted by email address( i need deletion of only a particular type of mail address). Is the any script to write and take the file as input and... (3 Replies)
Discussion started by: Chand
3 Replies

3. Shell Programming and Scripting

Take a list if strings from a file and search them in a list of files and report them

I have a file 1.txt with the below contents. -----cat 1.txt----- 1234 5678 1256 1234 1247 ------------------- I have 3 more files in a folder -----ls -lrt------- A1.txt A2.txt A3.txt ------------------- The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies

4. Shell Programming and Scripting

Convert perl qw list to text file list?

Does anyone have a good example? I am having trouble looping.. Thanks (1 Reply)
Discussion started by: mrlayance
1 Replies

5. UNIX for Dummies Questions & Answers

unix: extract a specific list of lines from a file

I would like to extract specific lines from a file and output them into another file. Each line in the file has a unique ID, and I have a specific list of IDs (that are not consecutive) that I wish to extract. for example: 1 aaaaaa bbbcb cccccc 2 aaaaaa bbbbb cccccd 3 aaaaaa bbbab... (6 Replies)
Discussion started by: mert2481
6 Replies

6. UNIX for Advanced & Expert Users

How to list locked file in unix?

Hi, I want to list out all files which are lock by some process. ex- ~/critical I want to list all files in critical directory which has been locked. I need this very badly. Any suggestion highly appriciated. Regards, Ashok (1 Reply)
Discussion started by: ashokd001
1 Replies

7. UNIX for Advanced & Expert Users

help with sorting sequence in Unix C:sort -t ':' +0 -1 -n +1 -2 +2 -3 -o list list

Hi List is 000|2008-07-17|556543|RTJ|35-RTGJ|EYT 465|2008-11-10|567789|GHJ|45-DGHH|ETU 533|2008-09-06|567789|GHJ|45-DGHH|ETU How does it do it? sort -t ':' +0 -1 -n +1 -2 +2 -3 -o list list (6 Replies)
Discussion started by: gurvinder
6 Replies

8. UNIX for Dummies Questions & Answers

list out a file using unix command

Hi, Iam a new member of this group I have got one issue I wanna to find out one file like *.pll in a remote server using unix command i tried giving ls but it wont work acc to my expectation since ls list out the file only in a particular directory eg in C DRIVE I SHUD BE ABLE TO... (2 Replies)
Discussion started by: dmerin
2 Replies

9. Shell Programming and Scripting

Another customisation for my computer

Hey, this time, I want my rhythmbox to play a different playlist at a set time (about sleeping time). my shellcode works, since if i run it it works, but when i make crontab run it, nothing happens. I try appending commands to the code, such as cp a file, and that occurs, so I have no idea what is... (1 Reply)
Discussion started by: davidY
1 Replies

10. UNIX for Dummies Questions & Answers

mailx sender address customisation

Hi All, I'm on UNIX -Solaris... I'm trying to send mail usin Mailx..... The script is working fine and attachments are also being sent.... BUT, when I receive the mail,, the sender address shown is the unix login id name.... Any way by which I could manipulate this in my script command or any... (1 Reply)
Discussion started by: vasan_srini
1 Replies
Login or Register to Ask a Question