look for the script's pid using ps
ps -ef|grep script.sh
Fdo 8983 8463 0 12:28 pts/2 00:00:00 /bin/bash ./script.sh
check /proc/$PID/fd/; there should be a broken link to the script file, but cat should work (while the script is running!):
# script contents!
My problem is not the same as can't type lower cased e in amazon ec2 (Amazon Linux), but similar.
After checking /etc/inputrc and finding nothing out of the ordinary, I remembered that I did do some keybinding in the /etc/bash.bashrc. This was already there for a very long time and worked flawlessly, though. Why would it make problems now?
I found out ...
Actually, a typical invocation of sudo does not read the password from stdin at all. Instead, sudo will directly access the controlling terminal (a tty or pty, via the /dev/tty special file) and output the prompt and read characters directly. This can be seen in the tgetpass.c file in the sudo source.
There are a few other scenarios:
If an askpass program ...
I believe this is not so much about man itself but rather about your pager of choice (PAGER environment variable) combined with the terminal in use.
I'm guessing your pager is probably less (typical default pager nowadays and fits with the description).
less has an option -X that may get you a behavior along the lines of what you're looking for.
-X or -...
A .inputrc in your home directory will cause ctrl+left to stop working on Ubuntu (for example).
To get everything working, add the following to ~/.inputrc:
# Include system-wide inputrc, which is ignored by default when
# a user has their own .inputrc file.
su - username is interpreted by your su to mean "run username's shell as an interactive login shell"
su username - is interpreted by your su to mean "run the following non-interactive command (-) as username"
the latter only worked at all because:
your su passes trailing arguments to sh for parsing
sh takes - to mean "run as a login shell (read /etc/profile,...
Old question, but it might still interest people.
Short anwser :
qemu -nographic -serial mon:stdio -append 'console=ttyS0' binary.img
ttyS0 valid on most PC. it would be something different on ARM system.
Then the serial port and the QEMU are multiplexed on your output. You can switch between them with ctrl-A + C + ENTER.
Long answer: check this blog, ...
hostnamectl is your friend (requires systemd).
A few examples:
Laptop without any virtualization
$ hostnamectl status
Static hostname: earth.gangs.net
Icon name: computer-laptop
Machine ID: 18a0752e1ccbeef09da51ad17fab1f1b
Boot ID: beefdc99969e4a4a8525ff842b383c62
Operating System: Ubuntu 16.04.2 ...
Yes. Your mysql dump is not clear text, but contains terminal controlling characters as well. Practically, it contains binary data. You can experience the similar flash if you print any binary data into your screen, f.e. cat /bin/bash.
It shouldn't happen so. Some solutions:
Check, where is the binary data in your mysql dump (I think, you had probably ...
As @Sven mentioned, the best option is to use screen or tmux. These are tools known as "terminal multiplexers". They allow you to create shell sessions which can be attached and unattached from actual logins. These tools aren't only useful to check your work from another terminal, but have other features, including sharing your session with another user and ...
This looks absolutely puzzling to me. Either it should use some DNS name or IP address. I checked the last.c file also but I still can't find why it is not showing anything. Probably given some time, I can figure out the part about 0.0.0.0.
int dns_lookup(char *result, int size, int useip, int32_t *a)
308 struct sockaddr_in sin;
309 struct ...
Hint 1: gpg calls private keys 'secret' because PGP dates from before people settled on the names 'private' key for the half of an asymmetric pair held by (ideally) only one party versus 'secret' key for a symmetric value usually held by two or more mutually trusting parties but nobody else.
man gpg2 | less "+/export-secret" then n (go to second match) ...
On Linux you can use the -@ option:
-@ file lists. If a file list is specified as -@ [Not on MacOS],
zip takes the list of input files from standard input instead
of from the command line. For example,
zip -@ foo
will store the files listed one per line on stdin in foo.zip.
So in your case you should be able to do:
If you are running less as your pager (which is very common), you don't need to deal with modifying your pager, just do I/O redirection:
man <whatever you want to man> | cat -
This will print a copy to the terminal so you can scroll up when you need it.
I spent a while trying to find documentation on this, and got this from a Fortinet Engineer.
Install like any other using tar.gz file Then run below command in
Then run below command in linux CLI
./forticlientsslvpn_cli --server 172.17.97.85:10443 --vpnuser forti
Make sure the command run from the sslvpn directory. Substitute the IP address ...
Many network devices use the Yost RJ45 pinout for RS-232 console communications. Cisco is probably the best known, but certainly not the only. The switch should have come with a DB9 to RJ45 blue cable. You can just pickup any USB-DB9 Serial adapter (though I highly recommend getting one with a Prolific PL2303HX Rev D Chipset, as they "just work" and are ...
The pipe connects sudo cat's stdout to less's stdin, so sudo cat's stdin is unaffected, and able to receive the password.
As for the prompt, it goes out on sudo cat's stderr; in bash, try redirecting that along with stdout, using
sudo cat /etc/resolv.conf |& less
and see how different the response is.
Telnet provides the ability to communicate with a service, nothing more nothing less. If that service happens to be a shell on a server, great, but it's not always. I often use telnet to send a malformed HTTP request manually, or to manually run commands against an SMTP server.
SSH is way more than just a way of logging on to a server remotely. It can be ...
You have a NAT router or a similar stateful firewall between your client and the server. When you opened the TCP session, the firewall remembered that a TCP connection was created between your client port and the server port. As long as the firewall remembers the connection, it will continue passing packets between the client and the server.
The session "...
One way to do it: TMUX
As most answers already pointed out - if in an existing SSH session - you use tmux (or screen) with the command
You now are in a new bash session, in which you can start your program / command. You can close it anytime (but not with CTRL+D, rather by closing the window) and return to it later by building up an SSH connection to ...
Those give all detailed info in a ui-style. If you are looking for a much simplier one use:
You'll get something like (realtime updates):
[user@host ~]$ vnstat -l
Monitoring em1... (press CTRL-C to stop)
rx: 4 kbit/s 5 p/s tx: 4 kbit/s 3 p/s
The same command can be used to get daily/monthly/etc traffic ...