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)

183
votes
14answers
102k 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 ...
47
votes
4answers
72k 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 ...
45
votes
4answers
44k views

How to wget a file with correct name when redirected?

So after some time of searching on Google and Super User (and scanning man pages) I was unable to find an answer to something that (I think) should be simple: If you go here: http://www.vim.org/...
45
votes
2answers
62k 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?
34
votes
14answers
71k 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). ...
34
votes
4answers
44k 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.) Note:...
32
votes
1answer
31k 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)?
25
votes
3answers
45k views

How to track url redirects in the browser?

When I type http://example.com/load/ in my browser and press ENTER, this website redirects me to http://example.com/load/1/, from there to http://example.com/load/2/ and then I finally landed on http:/...
25
votes
4answers
33k 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 ...
24
votes
3answers
15k 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?
23
votes
9answers
15k 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 ...
23
votes
4answers
55k 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 ...
22
votes
2answers
14k 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 ...
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 ...
20
votes
7answers
53k 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 ...
19
votes
2answers
10k 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 \; ...
19
votes
2answers
12k 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 | ...
15
votes
3answers
13k 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 ...
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: http://ishare.down.sina.com.cn/15181391.PDF?ssig=...
10
votes
3answers
247 views

Two Programs having their StdIn and StdOut tied

Suppose I have two programs called ProgramA and ProgramB. I want to run them both simultaneously in the Windows cmd interpreter. But I want the StdOut of ProgramA hooked to the StdIn of ProgramB and ...
10
votes
2answers
4k 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 ...
9
votes
1answer
1k 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
9
votes
3answers
2k views

Is there any way I can force Firefox to NOT cache redirects (301 and 302)?

I am a web developer, and there are many times where I have to create or alter a 301 or 302 redirect. It is cumbersome to test immediate changes in Firefox because it caches redirects, so if I change ...
9
votes
2answers
21k views

Prevent automatic redirects in Firefox

Firefox used to prevent automatic redirects and have a button you could use to opt-in to a redirect. However, a update a couple of months ago eliminated this feature and now Firefox (version 35) ...
8
votes
2answers
21k 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?
8
votes
2answers
323 views

How to avoiding losing your current browsers websites when being redirected by wireless login pages

It is common for public Wi-Fi access points to include login pages, even at times, when they’re free (i.e. Starbucks, many airports, hotels, etc). I’m often in a situation where I’ll open up Chrome/...
8
votes
2answers
17k views

In windows, can I redirect stdout to a (named) pipe in command line?

Is there a way to redirect the standard output of a process in Win32 console to a named pipe? Named pipes are built in to Windows and while they would be an useful concept, I've never seen them used ...
7
votes
4answers
511 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
3answers
8k 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?
7
votes
1answer
15k 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
11k 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 ...
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 ...
7
votes
2answers
7k 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 ...
6
votes
3answers
7k 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
2k views

Different output when redirecting

$ mysql -e 'select a,b from tablefoo' databasename yields +---+---+ | a | b | +---+---+ | 1 | 0 | | 2 | 1 | +---+---+ whereas $ mysql -e 'select a,b from tablefoo' databasename > file ...
6
votes
2answers
5k 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 ...
6
votes
5answers
958 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 ...
6
votes
1answer
1k views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c '...
6
votes
1answer
172 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
1k 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
1answer
5k 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 ...
5
votes
5answers
9k 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
5answers
8k 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 ...
5
votes
2answers
7k views

Redirect Domain Name to Localhost

I have a linux test machine which I would like to run a copy of a production webserver. This is a legacy application which does not use a property file for its server name. Throughout the application, ...
5
votes
4answers
2k 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
3answers
2k views

How to redirect output of a command to a file when the command will prompt user inputs?

I have a command which will prompt user for some inputs and then output the result to the terminal. I typed the command like below to redirect the output to a file: $the_command > abc.txt But it ...
5
votes
1answer
5k views

google.com/search redirects to google.com/webhp but only sometimes

According to the Internet, when google.com/search redirects to google.com/webhp, it means Search Conduit has hijacked the browser. In my case, this is what happens: https://www.google.com/search?ie=...
5
votes
2answers
9k 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 ...
5
votes
1answer
870 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 ...
4
votes
1answer
177 views

Redirection: How did the extra word get in the file?

I was testing a script and wanted to create a small file with a bit of text in it so I typed the following and forgot to escape the space in the filename: echo "bob">other name When I did ls, it ...