New answers tagged

0

It only updates the log when I press Ctlt in the first terminal with the dd. Is this because of the nature of dd? Yes. It is in the nature of dd to output its current status when it receives a given signal. Under most OSes, this signal is SIGUSR1, a standard signal but on OS X, it uses for the same a non standard signal named SIGINFO. Moreover, OS X has a ...


0

On OS-X, if you run stty -a you'll see that ^T is the key combination for status % stty -a | grep '\^T' min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; From man dd If dd receives a SIGINFO (see the status argument for stty(1)) signal, the current input and output block counts will be written to the standard error output in the same ...


-1

You can send the SIGUSR1 signal to dd which will cause it to output it's current progress to stderr allowing you to view the output. kill -SIGUSR1 $(pgrep dd) Edit: as noted below, on OSX you'd need to send the INFO signal as USR1 is for Linux only.


1

What you're seeing with ctlt is a summary of the running process information, not dd's output. dd does not output any progress information, unlike what you seem to expect. If you want to see the actual progress from another terminal window, look at the output file size changing. In this case you're writing to a raw disk, so patience is probably your ...


0

There are several places where you could have used a script besides ~/.bashrc or /etc/profile; without providing details on what changes you made, you will get only general advice. For instance, you might have modified or added a file in /etc/profile.d modified your ~/.profile or ~/.bash_profile run the terminal via a script (or desktop "launcher") You ...


2

You are likely (attempting) to redirect the output of your shell to a file, e.g., something like bash -i | tee foo $ vim Vim: Warning: Output is not to a terminal While you can read (most) commands from the keyboard via that approach, the output is no longer a terminal. You can recover by closing that shell and capturing output in a different way: the ...


4

You could use tput to move the cursor to a given line in the screen, e.g., tput cup 11 0 to move it to the twelfth line (values count from zero). Along the same lines, you could use tput to clear from that position to the end of the screen, using the ed capability. Combining, tput cup 11 0 && tput ed might be what was wanted. If you want to ...


3

So, you can have the output appear in the other terminal—though I doubt you really want to. To do so: Find the tty of the terminal you'd like the output to go to; the easiest way is to run tty. This should print something like: /dev/pts/42. In the other terminal, run: command > /dev/pts/42 &. If you want to do stderr as well as stdout: command > /...


1

Probably no workaround, judging by the fix applied in Bug 341157 - Konsole5 doesn't send Ctrl+Space anymore . At the end of the report, someone stated that it did not work for them. I just verified that the version in Debian/testing works for me. See screenshot:


0

If I ignore the transparency issue I got mate-terminal finally working by making my old profiles more accurate. Apparently mate-terminal now employs more stricter error checking mechanism and no longer work with undefined profile names ie. --tab-with-profile=Default only works in one profile (the first one.) Your next profile must be named differently (...


1

Im assuming you mean the profile of Gnome terminal, i.e., the color and size of the fonts in the terminal, background color etc, and not the styling of the GTK window and widgets of the terminal itself. In Ubuntu 16.04 the GTK version has switched to 3, so gconftool-2 won't work any more, you need to use gsettings. heres the bash script I use to recreate my ...


1

The manual page is not clear, but reading the source code helps: take a look at input-keys.c, and you will see the keys, listed in a table. the table is used in the same file, in input_key near the top of the file, there's a comment: /* * This file is rather misleadingly named, it contains the code which takes a * key code and translates ...


0

Additional solution to my problem: My current solution until I get used to i3 is using terminator with a custom layout. To the startup applications I've added a command terminator -l mylayout. After booting it starts the application in full-screen mode. Works exactly how I want it to work.


5

Technically, all you need to run GUI programs is the X server. You can run just a terminal emulator and run all programs from that. However life without a window manager is not comfortable at all: there's no interface to switch between, raise, resize, move, hide, close, and otherwise manipulate windows. So what you need is a window manager, probably without ...


6

One way or another, you would need X running. But you can get something like what you're asking with a tiling window manager. One of the earlier ones was "ion" (not as popular now). Further reading (no specific recommendations, of course: that would introduce opinion): Comparison of tiling window managers (Arch wiki) Why You Should Try a Tiling Window ...


4

Banshee (the animal) is not the same thing as banshee (the package name). These package names are case sensitive, and Debian packages have not been allowed to use upper case letters in their names since over fifteen years. Also, the lines beginning with deb are not commands; they are URIs that should be entered into the apt configuration file for that ...


0

would instead look something like this: If one wanted to break down what you want is : 1) the stdout stream would not end each line with a CRLF but instead with a '|' character. This would not align the two streams together of course, and alignment is out of the question because it would have to predict the length of future lines added in the stdout, which ...


0

The problem is that the color theme asks for more color than exist in the tmux terminal description, and vim is using bold to replace some of the missing colors. Rather than set -g default-terminal "tmux" use a terminal description which has a comparable number of colors, e.g., set -g default-terminal "tmux-256color" If your terminal database has "...


5

If you want to pursue your attempted perl solution, one way would be to use a hash as a simple lookup table e.g. %table = ("AA" => 2,"AB" => 1,"BA" => 1,"BB" => 0) and then use the value of @F[2] as the key. So for example perl -alne ' %table = ("AA" => 2,"AB" => 1,"BA" => 1,"BB" => 0); print $.==1? $_ : join " ", @F[0,1], $...


5

sed -i.bak -r 's/ AA$/ 2/;s/ (AB|BA)$/ 1/;s/ BB$/ 0/' input -i.bak in place editing and create a backup of original file as input.bak -r extended regex syntax s/ AA$/ 2/ replace ending character sequence of ' AA' with 2 (AB|BA) either AB or BA ; separates the different substitute operations


7

With awk: awk 'BEGIN { t["AA"] = 2 t["AB"] = t["BA"] = 1 t["BB"] = 0 } $3 ~ /^[AB][AB]$/ { $3 = t[$3] } 1' data.txt


9

There are two problems. The first one is that the order matters, the second one is /dev/tty. Let's use this script as an example script that we want to capture output from: test.sh: #!/bin/bash echo dada echo edada 1>&2 echo ttdada >/dev/tty Now let's see the outputs of the commands: ./testmyscript.sh 2>&1 >/dev/null: edada ...


38

The syntax you used is wrong. cmd &2>1 >file will be split down as cmd & 2>1 >file This will Run cmd as a background job with no redirections In a seperate process (without a command!) will redirect stderr to a file literally called 1 and redirect stdout to file The syntax you want is cmd >file 2>&1 The order of ...


2

The problem occurs because some programs do not cleanup properly when they are interrupted. The usual fix would be to use reset (you'll get less satisfactory results using stty sane): resetcontrolJ sends a newline even when your settings are messed up. Further reading: tset, reset - terminal initialization


0

If you really want to see the full lines you can copy and paste the text into a text editor like Atom or Notepad++ and disable line wraps in there.


3

The cat utility concatenates all its inputs into one data stream. Giving it two files, it produces output consisting of the complete contents of the first file, followed by the complete contents of the second file, in that order. In your case: $ cat file1 file2 >file-1-and-2


0

You can try with cat file1 >> file2 Or you can try the following while read LINE do echo $LINE >> file2 done < file1


1

Not sure, if my suggestion help, because I'm not able to simulate it for test. Anyway hope so.. You can use script instead of | tee ... script is tool for capturing user's output, so no need to invent anything new and I believe this should be resolved there. To use script for ssh only you can use: script -c "ssh ip@host" your.log or create (a stupid) ...


1

tmux (like GNU screen) works by translating the features of your actual terminal into an (often different) internal terminal. They do this to allow you to connect a session on different terminals at the same time, or at different times. When that works well, you will see the "same" text no matter where you are connecting from. Not all terminals support ...


0

Try this system-network-config-tui &


1

With bash, zsh: $ printf '%b\n' '\U2605' ★ (Your terminal must support UTF-8 characters)


1

If you use Bash you can trap the so called fake signal of DEBUG to achieve this: trap 'echo -------------' DEBUG and to make it permanent add the above to your .bashrc file.


1

Personally , I do the opposite - I mark the end of previous output with my prompt: ------------------------------------------------- DIR:/python|14:49|skolodya@ubuntu: $ echo "HelloWorld" HelloWorld ------------------------------------------------- DIR:/python|14:50|skolodya@ubuntu: $ The prompt itself can be modified in .bashrc or in any rc file that ...


0

You would probably find it fairly difficult, and there are very few examples from which you could learn how to do this. When you say "terminal", most readers assume you are talking about something like xterm or rxvt: a terminal emulator. Technically, Linux console is a terminal emulator as well. Terminals draw just one character on each cell (row and ...


0

Most applications stick to 16 colors (8 dark colors and 8 bright colors) known as ANSI colors, because that's the common denominator supported by almost all terminals. The ANSI standard doesn't specify the exact shade, it just says “black”, “blue”, “red”, etc. The default blue shade is often a pure blue that is hard to read on a black background on an RGB ...


1

Actually, emacs has more than one shell. There's a dumb shell which doesn't support full-screen terminal applications, and there is the "Ansi Term", which does. You could even run emacs inside that shell (though running commands inside the window might be more complicated than using emacs in its usual manner). For example, here is a screenshot of dialog ...


0

That is a normal message when executing unattended remote commands. Just put this into top of your unattended script : export DEBIAN_FRONTEND=noninteractive this will tell scripts you are executing an unattended script so they will know to just do default behaviour ... similar yet more generally applicable to adding the -y flag to some cli input parms


1

Nope, never have been able to read blue on black (and life is far too short to fiddle with colour customizations in every terminal or console combination I might use), so I disable colors by default. With xterm, an .Xdefaults entry of: XTerm*colorMode:false does wonders; otherwise, without a means to kill the colors in the terminal, application specific ...


4

What your terminal is doing The "rectangles with the numbers in [them]" are the way that your terminal emulator is displaying a terminal control sequence to you, because it doesn't recognize that sequence. Specifically: There is an ECMA-48 control character (in the C1 group, for the technical) named Operating System Command, abbreviated OSC. It has the ...


5

Not really. The library checks if it's running in "xterm" (by checking the TERM variable), and if so, just assumes that the application knows how to work with the xterm mouse protocol. With ncurses, gpm is something of a nuisance outside of its use in the Linux console. There are few applications which use it in a terminal emulator. Further reading: ...


0

Only the OS X terminal emulator can set the cursor position, when combining the left mouse button click with "Option". For linux terminal emulators, this feature is not available/wanted as of Q3_2016. There was at some point a request for the gnome terminal emulator to support this, but I do not think this feature is implemented (yet).


2

bash has the built-in ability to call an external editor to edit the current command line you're working on. Mouse support depends on the editor used. If you're using bash's emacs-like mode, use Ctrl-XCtrl-E to access the editor. If you're using vi-like keybindings, use ESCv You can also use the built-in fc command to edit any previous line. $ help ...


0

There is only a tiny fault I think. sudo opens a new shell for executing the command and after sudo the user is root. So maybe you should use something like this: MYUSER=$USER sudo chown $MYUSER:$MYUSER as i think MYUSER is not systemspezific overwritten and shall work.


0

You need to be sure to have the correct read write permits on the device, you could see it with: $ls -l /dev/[serial device] I rely on the script you found and made some modifications. For the development systems I've used by now, they used to need: None parity and One stop bit Those values are the default ones in the script. So in order to connect,...


4

You have three options: press controlS to stop output, controlQ to resume (this is called XON/XOFF) redirect your output to a pager such as less, e.g., strace date | less redirect your output to a file, e.g., strace -o foo date, and browse it later.


0

It could be a conflicting prefix key, so you could try changing this. Tmux allows for this, and you can make it persist by creating a ~/.tmux.conf file. The line to add to the conf file would be something like this: set-option -g prefix M-a Which would change your prefix key to Alt + A If you don't want these changes to persist, you can just run that ...


1

There are unrelated differences between Red Hat 6 and Ubuntu 16 for the screen-256color entry: the latter adds dim and omits initc. Neither of those changes is related to cursor-keys. Presumably the value of TERM outside tmux is xterm. There are also unrelated changes between the two systems for the xterm entry (the cursor color extensions mentioned in ...


1

This turned out to be because I had enabled the ui color=always option in git, not directly because of my shell prompt or the parse_git_branch function. The "git branch" command was displaying with color, but the original author of the parse_git_branch function did not account for that and chopped the string up in such a way that the color codes didn't get ...


1

When you install git package. It should install a local file that you can source which has the branch parsing built in. Have you tried using that instead? I use this with no issues. This is taken from RHEL, so git-prompt.sh might be in a different location on ubuntu. Just do a "locate git-prompt.sh", alternatively looks like a version is available ...


3

You can put literal escape characters into /etc/issue as suggested in a comment (Red Hat does this, sometimes). In a quick test, that works, but only colors the text. The background is uncolored. In vi, the text might look like ^[]P7000000^[]P0F0F0F0\S Kernel \r on an \m and the result like this: If you clear the screen, then the colors fill the ...



Top 50 recent answers are included