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)

46
votes
7answers
22k 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 ...
36
votes
3answers
39k 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 ...
24
votes
2answers
21k 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?
22
votes
1answer
16k 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)?
21
votes
14answers
35k 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). ...
20
votes
4answers
25k 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.) ...
17
votes
3answers
17k 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: ...
14
votes
4answers
12k 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 ...
13
votes
13answers
1k 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: ...
12
votes
2answers
5k 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 \; ...
11
votes
4answers
21k 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 ...
11
votes
5answers
6k 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 ...
11
votes
2answers
6k 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 ...
10
votes
3answers
3k 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?
10
votes
6answers
21k 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 ...
9
votes
2answers
3k 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
5k 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
2answers
13k 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
431 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
1answer
699 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
6
votes
2answers
4k 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
2answers
2k 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 ...
6
votes
1answer
142 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 &> ...
6
votes
2answers
8k 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 ...
5
votes
5answers
901 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
2answers
10k 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 ...
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
576 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 ...
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
2answers
3k 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
667 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
1answer
231 views

Restructure The C:\ Directory Without Affecting Programs

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
9k 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
102 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
506 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
3answers
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?
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
157 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
4k 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
445 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
1answer
824 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
414 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.
3
votes
2answers
288 views

How can I tell my dd-wrt router to use someone's Amazon Affiliates link when I point my browser to amazon.com?

Here's what I'd like to do. Instead of a one-time donation to one of my favorite free tools (junecloud.com) I'd like to do what they suggest here and use their Amazon Affiliates link to do all my ...
3
votes
2answers
9k 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 ...
3
votes
3answers
110 views

Redirected: Is there a way to “grab” urls I'm being redirected through?

Let's say I'm visiting yourwebsite.com which redirects to somethingelse.com which redirects to somethingdifferent.com before taking me to finalpage.com. All of this happens in an instant, so quickly ...
3
votes
2answers
5k 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>checkmark warn me when sites try to redirect or reload the page, but that ...
3
votes
3answers
341 views

Chrome redirecting me to Google China

When I am accessing Google sites, Chrome is automatically redirecting me to Google China. This issue seems to be intermittent - occasionally, Chrome will direct me to the regular Google website. I ...
3
votes
2answers
2k views

How to check if your email is redirected or tracked

I would like to ask if there is a way to check if your emails are also sent to another email. I work for company and i think they are ''tracking'' my email adress and want to check if this is true. I ...
3
votes
3answers
152 views

Distinct Proxying for any TCP-related Protocol

I'm not sure what to call it (proxy/redirection/relay), and I am hoping some software or solution possibly exists for linux. My intention is to be able to listen on a single public facing ip:port ...