Can be either redirection internet traffic to different IP's or redirection of files from one path to another path.

learn more… | top users | synonyms (1)

70
votes
7answers
34k views

How can I make Chrome stop caching redirects?

I am working on a web application that is using redirects (for pretty URLs). I am trying to debug logic in the way the redirects are working. However Google Chrome keeps remembering the redirects and ...
39
votes
4answers
47k views

What does “2>&1” do in command line?

I know that the > sign is used for output redirection in the command line, but I'm having trouble finding something that explains the use of 2>&1 in the command line. For example: curl ...
28
votes
14answers
42k views

How to find out the real download URL on download sites that use redirects

Let's say I want to download something with wget but the website that has the files I need redirects to a site which automatically chooses a mirror for me (and there's no static file URL provided). ...
27
votes
2answers
28k views

how do I echo $something >> file.txt without carriage return?

When I echo $something >> file.txt, a new line will be append to the file. What if I want to append without a new line?
24
votes
3answers
22k views

How to wget a file with correct name when redirected?

So after some time of searching on google and superuser (and scanning man pages) I was unable to find an answer to something that (I think) should be simple: If you go here: ...
24
votes
1answer
19k views

Is there an equivalent to /dev/null in Windows?

If I want to ignore stdout of a command, I do this on *nix: myprog > /dev/null How do I achieve the same on Windows (in cmd or a batch file)?
23
votes
4answers
30k views

Redirect URLs in Chrome?

Is there any extension to Chrome that will let me force a URL from a particular domain to be redirected to another domain? (E.g. Redirect http://www.google.com to https://encrypted.google.com.) ...
21
votes
1answer
2k views

Why does the “>” command in a Windows console not redirect all messages to a file?

I am trying to build a Scala project with sbt, so I run a command: sbt clean test > log.log Which means that any messages that the sbt tool writes to the Windows console should be written to the ...
16
votes
2answers
6k views

How can I use '{}' to redirect the output of a command run through find's -exec option?

I am trying to automate an svnadmin dump command for a backup script, and I want to do something like this: find /var/svn/* \( ! -name dir -prune \) -type d -exec svnadmin dump {} > {}.svn \; ...
15
votes
4answers
16k views

cURL: how to suppress strange output when redirecting?

I'm trying to print just the verbose sections of a cURL request (which are sent to stderr) from the bash shell. But when I redirect stdout like this: curl -v http://somehost/somepage > /dev/null ...
14
votes
7answers
28k views

Why redirect output to 2>&1 and 1>&2?

I have come across several commands that use 2>&1 and 1>&2 but quite can't get my head around the purpose of using it and when I should be using it. What I understand I know that 1 ...
13
votes
13answers
2k views

How to analyze a link to figure out the actual link

Sometimes when downloading something, I find the links are not the direct ones to the files. For example, this is a link to download a PDF file: ...
13
votes
6answers
8k views

Log rotation of stdout?

I have a Linux program which can write information to stdout and stderr. I have a shell script which redirects that output to a file in /var/log. (Via >> and 2>&1.) Is there a way to ...
13
votes
2answers
7k views

Default PowerShell to emitting UTF-8 instead of UTF-16?

By default, PowerShell in Windows seems to be outputting UTF-16 (e.g., if I do a simple echo hello > hi.txt, then hi.txt ends up in UTF-16). I know that I can force this to my desired text ...
12
votes
4answers
26k views

Remotely run script on Unix, get output locally?

I need to run a (Tcl, or whatever) script on a remote Unix machine, from a (local) Windows command shell, and I want the stdout/stderr of the script to show up in the Windows CLI. The exit code would ...
12
votes
3answers
5k views

What is the difference between &> and >& in bash?

What is the difference between &> and >& in bash? tldp did not mention the latter one. Is it really a redirection operator? Or does someone know a more complete tutorial?
9
votes
2answers
4k views

Is there a binary-safe “triple less than” <<< operator in bash?

This is a rather hypothetical question, so please don't ask me why I'd want to do this. Assuming that I have a variable GIF that contains binary data, and assuming that I cannot use the pipe | ...
8
votes
2answers
6k views

Windows CMD Batch, START and output redirection

I would like to run two programs simultaneously from a batch file, and redirect the first program's output into a text file like: start python 1st.py arg1 arg2 > out.txt start 2nd.exe %1 arg2 arg3 ...
8
votes
1answer
830 views

Is backwards redirection the same as a pipe?

In Linux if you type sort < txtfile is that the same thing as cat txtfile | sort
8
votes
2answers
15k views

How to redirect output to a text file and the console (cmd) window at the same time?

How can I redirect output to a text file and the console (cmd) window at the same time?
7
votes
4answers
460 views

Documenting Unix commands on the command line

I would like to append both the last command and the output of the last command to a text file for the purpose of a tutorial. For example: After I do an ls in my home directory I see this on the ...
7
votes
2answers
3k views

Do browsers change URLs of saved bookmarks in response to 301 redirection?

HTTP status code 301 is used to indicate that content has moved permanently, and that the returned URL should be used to access the requested content in future. RFC 2616 says Clients with link ...
7
votes
1answer
12k views

Redirect input from one terminal to another

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect ...
7
votes
2answers
9k views

How I could redirect all my traffic to the TOR network?

I need to redirect all my traffic to the TOR network. I have just installed Vidalia, but I think that I have not correctly configured my Tor-client. I have a Java desktop client that has to access a ...
6
votes
3answers
5k views

How to redirect to stdin of a running bash shell?

Theoreticly, if I know the pid of the bash shell which is running, I can run a cat whose stdout is redirected to the stdin of that shell. It seems to be as if I type something on that shell. ...
6
votes
1answer
154 views

What is a good way to get back to the command prompt discarding STDOUT and STDERR

I often launch applications from the cli via e.g. command & to immediately get back to the prompt back. The downside of this is, that I still get STDOUT and STDERR. So I use command &> ...
5
votes
5answers
972 views

Want to use apache, ISP blocking port 80

I am attempting to set up a small web server on my home network, but my ISP is blocking incoming port 80 ( and no, i'm not paying $50/month extra for them to unblock it). I am looking for some ways ...
5
votes
5answers
8k views

Getting redirected to www.website-unavailable.com

When ever I type a wrong URL in to my URL bar, it redirects me to: www.website-unavailable.com How do I stop this from happening? I would much rather just get redirected to Google. This happens in ...
5
votes
4answers
1k views

Windows redirect traffic to different DNS name not fixed IP address (hosts file equivalent)

Using the Windows hosts file, one can redirect traffic for a domain to a specific IP address, e.g. domainA.com --> 127.0.0.1 I am looking for a SIMPLE way to do the same, but for a target domain ...
5
votes
4answers
643 views

Is there a way to “redirect” a click on a URL in a VirtualBox guest to open in the host OS browser?

I'm using VirtualBox OSE on Ubuntu 10.04. I have a Windows 7 guest VM which I use almost exclusively for MS Outlook to access my Exchange mailbox. If I click a URL in Outlook it obviously opens in IE ...
5
votes
1answer
4k views

In Firebug, how can I stop a redirect?

In Firebug, how can I stop a redirect? I want to examine and edit a webpage before it redirects. Under the Net tab, using Persist I can see all the GET including the previous pages and the redirect ...
4
votes
4answers
3k views

Stop Firefox from redirecting mistyped domains to ask.com

When I get a URL wrong at the top level (i.e. when DNS lookup returns NXDOMAIN), my Firefox browser redirects me to ask.com. How do I remove or customise this functionality? There's nothing obvious ...
4
votes
4answers
4k views

How to ignore error messages in bash on Ubuntu?

I'm trying to show the number of lines, words and characters of all configuration files in /etc/*conf (with command wc). How can I modify the command (or commandline) to not view the error messages?
4
votes
2answers
4k views

Redirect 7-Zip's command-line output to /dev/null on Windows when extracting a .7z file

I have a command such as "C:\Program Files\7-zip\7z.exe" x foo.7z -y which will extract (with full paths) to the current directory. What it does that I don't want, though, is to spool out the ...
4
votes
1answer
859 views

Why does redirection fail when passing through ssh, sudo and sh?

After reading this question, I know that I have to do sudo sh -c 'ls -hal /root/ > /root/test.out' to avoid the "Permission denied" error. But when I do ssh hostname sudo sh -c 'ls -hal /root/ ...
4
votes
2answers
6k views

Disable 302 Redirects in Firefox

I need to temporarily disable 302 redirects in Firefox. How can I do this? I tried going to tools > options > advanced > general > check warn me when sites try to redirect or reload the page, but that ...
4
votes
1answer
256 views

Restructure The C:\ Directory Without Affecting Programs [closed]

I'm want to do some tweaking to my PC's file hierarchy, but just moving folders and files around disables programs that depend on certain files to be in certain hard-coded addresses. One solution ...
4
votes
1answer
10k views

WIndows 7 - Virtual PC - Printer redirection

Where can I set the printer redirection in Windows 7 Virtual PC? I cannot find it and Windows XP Mode does not have the printers that are installed locally on Windows 7. I see everywhere on the ...
4
votes
1answer
192 views

Intercepting redirects in Chrome

Is there a way in Chrome to intercept meta/301/302 redirects and decide whether or not to follow them? I'm looking to do the same thing that Django and Symfony 2 do to intercept requests:
4
votes
1answer
555 views

Outlook Addin to redirect email on an ad-hoc basis

I would like to redirect certain emails to a different email address when I desire, preferably by some kind of Addin button. I know that I can create rules to redirect emails however there is no ...
3
votes
4answers
5k views

Redirect stdout while a process is running — What is that process sending to /dev/null

I've run a command and redirected it's output via > /dev/null Now that it's been running significantly longer than I expected I want to see what it's doing. Is there a way to re-redirect the ...
3
votes
1answer
2k views

Replacing cmd.exe with an another console tool [duplicate]

I like to use Console2 instead of the default command line for Windows. Out of habbit i'm still writing "cmd" into Total Commander's command line sometimes to open a DOS console into the current ...
3
votes
5answers
5k views

Port forwarding software (service) for Windows

I have a server service that uses 8182 port. Somebody want to connect to this, but 8182 port is unavailable for him, only 5118 working fine. No problem I thought, I just install port forwarder ...
3
votes
1answer
1k views

copy (split?) stdout instead of redirecting it

In Bash, I'd like to redirect stdout to a file (>> mylog.txt) but also see the stdout output on the screen.. How can I do it with bash?
3
votes
1answer
160 views

output redirection with sudo [duplicate]

Possible Duplicates: How to append to a file as sudo? sudo unable to write to /etc/profile The following command does not work because the elevated privileges do not apply to the ...
3
votes
2answers
6k views

How do I eliminate unwanted redirects on a web page?

I have been accessing a particular web site over a period of months. Over the last two days, every time I try to access the site, I see the site page for less than a second, and then get redirected to ...
3
votes
1answer
657 views

Why can I see password prompts through redirecting output?

So, I've got a command that I'm issuing that is essentially 'ssh'ing into various hosts: command 2&>1 | grep "desired output" Every once in a while, in the midst of the command, it'll run ...
3
votes
2answers
276 views

Redirecting output to email

I am aware that in Windows you can use the following snippet to redirect the output of a command line tool to the clipboard: mytool | clip Also, it can be done with files: clip < myFile.txt I ...
3
votes
1answer
853 views

How to redirect one single webpage to another (client-side)?

I often access bibliographical databases from one or several publishers for my work (sciencedirect.com, springer.com, etc). When I am on the network of my lab, I can access with no problem (as long as ...
3
votes
1answer
444 views

Pipe Ubuntu Sound Output To Mac

I am running ubuntu 10.04 and would like to redirect all the sound it outputs to my mac over the network. Is there any way to do this? I would like to hear sound from the mac as well.