Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
feldim2425

Download and upload programs

Recommended Posts

Just a short tutorial on how to download programs from the internet.

 

You need... 

 

*) Computer (min. tier 2 case)

*) Internet Card

*) Disk or a Hard Drive (to store the file)

 

Make sure that HTTP is enabled in the config!!! (default enabled)

 

Download from Pastebin

The OC pastebin program works like the program from CC.

 

pastebin get [-f] <pastebin code> <path to the new file + filename> -- without path it will store the file in the current work directory

 

-f  (optional) overwrites a existing file

 

example:

pastebin get G61bgv29 hello.lua   --stores hello.lua in the current work directory

pastebin get G61bgv29 /bin/hello.lua   --stores hello.lua in /bin folder

Download with wget

If you want to download a program from Github or another Website you can use wget.

 

wget [-f] <download url> <path to the new file + filename> -- without path it will store the file in the current work directory

 

-f  (optional) overwrites a existing file 

 

example ( I used a pastebin url):

wget  'http://pastebin.com/download.php?i=G61bgv29'  /bin/hello.lua  ----stores hello.lua in /bin folder

Upload to Pastebin

It is also possible to upload files to pastebin.

 

pastebin put <path to file>

 

it will output:

/# pastebin put <path>
Uploading to pastebin.com... success.
Uploaded as http://pastebin.com/<Pastebin ID>
Run "pastebin get <Pastebin ID>" to download anywhere.
/#
Link to post
Share on other sites
On 11/19/2016 at 6:47 PM, feldim2425 said:

You can't download directories.

I checked the Pastebin API and it doesn't look like they added directories to the API.

And 'wget' uses the same download as your browser does and this method doesn't support downloading folders.

Wget can download directorys
 

Here is a guide from linux.com

Quote

 

wget -r –level=0 -E –ignore-length -x -k -p -erobots=off -np -N http://www.remote.com/remote/presentation/dir

Here are the options:

-r : Recursive retrieving (important)
–level=0: Specify recursion maximum depth level (0 for no limit), very important
-E: append “.html” extension to every document declared as “application/html
useful when you deal with dirs (that are not dirs but index.html files)
–ignore-lenght: Ignore “Content-length” http headers, sometimes useful when dealing with bugged CGI programs
-x: Force dirs, create an hierarchy of directories even if one would not been created otherwise
-k: here’s one of the most useful options, it converts remote links to local for best viewing
-p: download ll the files that are necessary for proper display of the page
(not so reliable when dealing with JS code but useful)
-erobots=off: turn off http robots.txt usage
-np: no parent, do not ascend to parent dir when retrieving recursively,
one of the most useful function I’ve seen

 

I'm pretty sure that the both programs are the same

Link to post
Share on other sites
On 6/24/2021 at 10:36 PM, tt_thoma said:

I'm pretty sure that the both programs are the same

Unfortunately here, they only share the name and the purpose. For one, the program you've read about isn't even written in Lua, so you can't really expect it to run on OC.

The one included in OpenOS cannot, in fact, download directories recursively. Nor do any of the fancy things the other program can. When searching for what an OpenOS program does, documentation for utilities included in a Linux distribution probably won't be useful. Instead, type man programname in the OpenOS shell, or look into the program's source code (edit /bin/programname).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.