which file belongs to which directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting which file belongs to which directory
# 1  
Old 10-11-2005
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  
Old 10-11-2005
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.
Code:
find . -name '*.xml' | xargs ls -lrt

Login or Register to Ask a Question

Previous Thread | Next Thread

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

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

3. 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

4. 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

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

How to check if a user belongs to a group (KSH)?

Hi all, How can I check if a particular user id belongs to a group? (ie. how to check if the current user `whoami` is part of the a certain group? do i use the group name of group id?) Thanks in advance (2 Replies)
Discussion started by: rockysfr
2 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
Login or Register to Ask a Question