Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  14] [ 0]  / answers: 1 / hits: 10185  / 2 Years ago, sat, may 14, 2022, 9:05:49

I have a file, /home/user/important.txt. To find it, I use:



find /home/user -type f -name 'important'


Then, I want to open the file in the Vim editor using a pipe.



How can I do this?



Something like



find /home/user -type f -name 'important' | vi

More From » vim

 Answers
4

Add * wildcard after 'important', also you can use the following command:



vim $(find /home/user -name "important*")

[#21298] Sunday, May 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
;