Skip to main content
Tweeted twitter.com/StackUnix/status/1141224348260470789
edited title
Link
user313992
user313992

Why are < or > requriedrequired to use /dev/tcp

Became Hot Network Question
clarify based on comment
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

When trying to call /dev/tcp/www.google.com/80, by typing

/dev/tcp/www.google.com/80 

Bash says no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

When trying to call /dev/tcp/www.google.com/80 Bash says no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

When trying to call /dev/tcp/www.google.com/80, by typing

/dev/tcp/www.google.com/80 

Bash says no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

edited body
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

When trying to call "/dev/tcp/www.google.com/80"/dev/tcp/www.google.com/80 Bash says "no such file or directory"no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

When trying to call "/dev/tcp/www.google.com/80" Bash says "no such file or directory". When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

When trying to call /dev/tcp/www.google.com/80 Bash says no such file or directory. When looking at other people's code online, they use syntax such as

 3<>/dev/tcp/www.google.com/80 

I noticed that this works as well:

</dev/tcp/www.google.com/80

Why are these symbols required to call certain things in bash?

edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 266
Loading
Source Link
john doe
  • 1k
  • 2
  • 18
  • 32
Loading