which file belongs to which directory

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting which file belongs to which directory
# 1  
which file belongs to which directory

let I executed the following command:
ls -lrt mdase mvfile test | grep '\.xml'
the output is :
-rw-r--r-- 1 surjya other 0 Sep 23 16:25 sample.xml
-rw-r--r-- 1 surjya other 0 Oct 5 16:11 tst2.xml
-rw-r--r-- 1 surjya other 0 Oct 5 16:12 test3.xml
-rw-r--r-- 1 surjya other 0 Oct 6 16:08 mvtest.xml
-rw-r--r-- 1 surjya other 0 Oct 6 16:08 mvtest.xml
-rw-r--r-- 1 surjya other 0 Oct 6 19:34 neha.xml

In the above output shows two mvtest.xml files. How can I know that which mvtest.xml belongs to which directory. If any command available to get it
# 2  
You are the author of 2 other posts which look very similiar.

To get the file names.
to find the file with full path

I am not sure if similiarity of posts contribute towards violation of the rules.

Try this.
find . -name '*.xml' | xargs ls -lrt

Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #448
Difficulty: Medium
Quirky Linux and Puppy Linux were both created by Barry Kauler.
True or False?

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Does anyone know what technology this logo belongs to?

It came in a template full of techy-related stickers for laptop (like Docker, K8s, BigData, RHEL, AWS, etc) but I have no clue what it represents. Any idea? https://i.imgur.com/7ILp105.png Thanks. (7 Replies)
Discussion started by: verdepollo
7 Replies

2. UNIX for Advanced & Expert Users

How to kill a thread among several threads belongs to a process?

I would like to know is there any we can kill a single thread among multiple threads belongs to process? Since Signal action is process wise not per thread, i strongly feel that we can not or for that mater from external sources as well single thread can not be killed which is critical section... (2 Replies)
Discussion started by: murali242512
2 Replies

3. UNIX for Advanced & Expert Users

ldapsearch to find netgroups which a user belongs to

how to use ldapsearch to find all the netgroups a user belongs to? It's Solaris. (1 Reply)
Discussion started by: jalite19
1 Replies

4. Shell Programming and Scripting

read numbers from file and output which numbers belongs to which range

Howdy experts, We have some ranges of number which belongs to particual group as below. GroupNo StartRange EndRange Group0125 935300 935399 Group2006 935400 935476 937430 937459 Group0324 935477 935549 ... (6 Replies)
Discussion started by: thepurple
6 Replies

5. AIX

/home belongs to a user?

While doing a "little" clean up job, i noticed something weird... A ls -altr of my / showed this: drwxr-xr-x 1549 johcham grands 102400 Jan 28 13:13 home How can a user become the owner / modify the group of my /home??? any thoughts? Can i chown this back to bin:bin (i think that... (2 Replies)
Discussion started by: Stephan
2 Replies

6. UNIX for Dummies Questions & Answers

Tru64 - how can you determine the package where a file or binary belongs to?

Dear linux-unix users, I hope that one of you will be able to help me. How can I determine to which package a file or binary belongs to. With solaris/linux package managers you can easely determine this but i cant find the way how to do this on tru64. Any help would greatly be appreciated.... (0 Replies)
Discussion started by: Crazy_lenny
0 Replies

7. Solaris

Daemon belongs to which package..

If i know a daemon and it is running.. How can i know that daemon belongs to which package? (5 Replies)
Discussion started by: younus_syed
5 Replies

8. Solaris

How to determine which SIP a package belongs

Hi Folks, Is there anyway I can determine the package set (or SIP) that a package belongs to. It doesn't seem that pkginfo does it?? I'm trying to remove a whole lot of unecessary packages, and it would be far more convenient if I could remove whole sets at a time instead of indivdual packages.... (0 Replies)
Discussion started by: brizrobbo
0 Replies

9. Shell Programming and Scripting

Finding the group to which a user belongs

Is there any command to find to which group u ser belongs (3 Replies)
Discussion started by: radhika03
3 Replies