Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

terminal find containing directory of file and cd to directory

$ cd `find ~ -name filename.txt -exec dirname {} ;`
Source by superuser.com #
 
PREVIOUS NEXT
Tagged: #terminal #find #directory #file #cd #directory
ADD COMMENT
Topic
Name
2+3 =