Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Totally new to Linux, have an Arch Linux machine up. What is the command I can execute on the console to download a web page in the console?
Thanks
Is wget installed?
wget http://http://stackoverflow.com/questions/9320913/how-do-you-download-a-web-page-in-arch-linux
If You want download whole page to the disc, good practice is use wget with options -k -r -p:
wget -k -r -p http://http://stackoverflow.com/questions/9320913/how-do-you-download-a-web-page-in-arch-linux
This command is downloading recursively all the files that are necessary to properly display a given html page and convert the links to make them suitable for local viewing.
try wget see http://linux.die.net/man/1/wget
wget
curl is another good option. Have fun with Linux!
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to download all the audio files on this VoxForge web page. Unfortunately I don't understand how to download them all in a folder of my choice with a single command from the terminal using wget or alternatively curl. I tried wget like this without success:
wget http://www.repository.voxforge1.org/downloads/it/Trunk/Audio/Main/16kHz_16bit/ -P / home / user / download /
doing this way I get only an html index file
curl http://www.repository.voxforge1.org/downloads/it/Trunk/Audio/Main/16kHz_16bit/ | awk -F \" '/tgz/ { print "http://www.repository.voxforge1.org/downloads/it/Trunk/Audio/Main/16kHz_16bit/"$6 }' | xargs wget '{}' \;
Curl the link and parse the output with awk to get the full download address of each tgz file. Pipe this through to xargs and wget to download the links
The following command should work for you.
wget --directory-prefix=download_folder --no-directories --mirror --no-parent http://www.repository.voxforge1.org/downloads/it/Trunk/Audio/Main/16kHz_16bit
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to download hundreds of files from some website to my own server using ssh, the remote files are in series: 0001.jpg : 0900.jpg
how to do this ?
thanks
If you only have HTTP access then I don't understand why you say you want to use SSH...
Here's how to do it over HTTP:
curl -f -O http:www.example.com/folder/image[0001-0900].jpg
scp accepts wildcards.
ie:
scp user#host:/path/* ./path/to/files/locally/
you can use scp with your username and password on remote server.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am working on a Linux server, I have access to a directory but I am not allowed to write anything to that directory. I can run commands from system prompt. Now I have to find values of specific field of some files in that dir and do some comparisons. I have a script on a test server can do that. But I can't install my script to the server, I am asking if there is anyway I type a specific command, then I can write and run a shell program without saving the program? Thank you!
If you have the script on another host, you can run it this way:
wget http://your.host.net/script -O- | sh -s
If the host is not accessible via HTTP, you can use any other protocol you want.
Also you can write a script direct in a shell:
sh -s <<EOF
echo Hello
echo I am script
echo Nice to meet you
EOF
You can use backtics to execute the result of another command.
`wget /path/to/your/script/stored/remotely -O-`
(you might use sftp to fetch the script instead)
Another option is to write a program that uses a tty to control an ssh session, then the script is stored on the ssh client but the commands run on the server. Perhaps the expect tool would help with that.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm working with the sed editor and I realize that my command prompt is:
[darkchild#localhost ~]$
How can I change this so that it ends in #....and what does this mean?
for example:
[darkchild#localhost ~]#
A friend told me to write this command #!/bin/bash but it does not change the prompt to #.
Can someone educate me?
Canonically # means root shell. You probably do not actually want to do this, because it would confuse other users of your system. If you do actually want to do this, you can edit the PROMPT variable.
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/
You can run the following command:
set prompt=\[`id -nu`#`hostname -s`\]\#\
This is the root user. You can go to this user using the su command.
More info: http://en.wikipedia.org/wiki/Su_(Unix)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
This post was edited and submitted for review last month and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
How to create a link to an existing file or directory using a GNU Linux shell command?
Symbolic or soft link (files or directories, more flexible and self documenting)
# Source Link
ln -s /home/jake/doc/test/2000/something /home/jake/xxx
Hard link (files only, less flexible and not self documenting)
# Source Link
ln /home/jake/doc/test/2000/something /home/jake/xxx
More information: man ln
/home/jake/xxx is like a new directory. To avoid "is not a directory: No such file or directory" error, as #trlkly comment, use relative path in the target, that is, using the example:
cd /home/jake/
ln -s /home/jake/doc/test/2000/something xxx
you should use :
ln -s /home/jake/doc/test/2000/something xxx