• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

locate and copy found file to selected location

Hello Experts,

How can I combine two tasks in one line.

locate aaa.xxx
cp "the file we found" "to current location"

Thank you

panJams
0
panJames
Asked:
panJames
1 Solution
 
woolmilkporcCommented:
cp $(locate aaa.xxx) .

Please note the space and the dot (" .") at the end.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now