Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting all parent directory name

 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Suppose i have directory structure like like this-

dir_1/dir_2/myfile.txt

How can i take the output like this "myfile is in : dir_1/dir_2"?
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i got
/home/student
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic