im trying to find my .csv files then cd into their directory:
find Documents/notes -type f -name "*.csv" | head -1 | xsel -b
this copies the first file dir into my clipboard and i'd like to then run:
cd $(xsel -b)
but ofcourse I can't because it's including the filename which isn't a directory.
Is there anyway to omit the filename? is there a better way to do this?
find
to go to directory of that file – steeldriver Sep 17 '23 at 20:34