I've downloaded file through curl in mac OS but now i can't locate its location in my system

0

command i've used ->

curl link... | bash

I've downloaded file from GitHub through curl in macOS but now I can't locate its location in my system though I can access it.

I don't want it in my system anyway now.

Can anyone tell me where curl files been downloaded or how to delete that file.

Helpsickr

Posted 2019-01-23T19:19:51.240

Reputation:

Answers

0

This isn't security related. But the answer might be helpful to others. When you ran

curl http://someurl | bash 

you had curl send the output to bash, bash ran the content of the page. wget saves pages by default, curl outputs to screen. To do what you want you'd use -o .

curl http://someurl -o somefile.html 

Joe M

Posted 2019-01-23T19:19:51.240

Reputation:

can i delete or locate that file in my system? – None – 2019-01-23T19:42:03.413

Please re-read the answer and use the "history" command to determine if the output was shown on the terminal (bash) or saved to a file. If it was saved to a file, you'll be able to find it and remove it. If it was shown on the terminal, then there's no need to delete anything. – Christopher Hostage – 2019-01-23T20:36:35.573

0

As mentioned by Joe M. you need to designate a file to output to. After doing so the file will be located in the context of your terminal session such as your home directory. If you used the cd command to change directories then you also changed your directory context. Processes are bound to their directory context (mostly). If you are having a hard time finding your file try using

find . -iname nameoffile.extension

or

locate nameoffile

e-Euler

Posted 2019-01-23T19:19:51.240

Reputation: 21

0

If the "curl" command was recently entered, then run "history" to see recent commands and figure out where the working directory was at the time curl was run. If the Terminal was closed, then the history might not include it.

Christopher Hostage

Posted 2019-01-23T19:19:51.240

Reputation: 4 751