New answers tagged

0

Your user does not have the permission to write in the directory you are trying to copy the file. Use root account or try with sudo -u "user" cp file path.


0

unalias command turned off alias for the duration of the current login session. the alias is not removed by unalias command from the .bashrc file, when the user logs in again, that alias is again in effect. .bashrc is a hidden file, You can check the list of alias by typing: $ alias Check shell configuration file ~/.bashrc and you can remove required ...


2

If unalias removes the issue (even temporarily) we have confirmation it is an alias. It could be "brute forced" out by adding an unalias ls in ~/.bashrc. echo "unalias ls" >> ~/.bashrc That will get excuted every time bashrc is read and will remove the alias. That will buy you some peace but will not resolve the actual issue that some file is still ...


1

"Raster font" sounds like the Windows command-window (and by the way is not a TrueType font). Linux console fonts can be set, but those are custom-built fonts (not generated or automatically translated from Windows fonts). Unless someone made one of the Linux console fonts to imitate the Windows appearance, you're out of luck. Further reading: How to ...


0

Add an entry for this network to /etc/wpa_supplicant.conf. If the file does not exist, create it. Replace myssid and mypsk with your SSID and PSK network={ ssid="myssid" psk="mypsk" } Add entries to /etc/rc.conf to configure the network on startup: wlans_ath0="wlan0" ifconfig_wlan0="WPA SYNCDHCP" Restart the computer, or restart the ...


2

It looks like tmux is doing the right thing for your example: For example, ctrl-shift-right passes as ^[[C (which is the same as the escape sequence of the right key), instead of ^[OC (outside tmux). because the usual connotation of that sequence is that it is the same as cursor-movement sent from the host. A zero parameter is the same as a missing ...


3

One way is to use a function instead of the alias - put this in your .bashrc or .bash_profile - sreq() { ffmpeg -f x11grab -r 24 -s 1024x768 -i :0.0 -qp 0 -c:v libx264 -preset veryslow $1.mkv }


1

Why don't you just upgrade the alias to a function, e.g function sreq() { ffmpeg -f x11grab -r 24 -s 1024x768 -i :0.0 -qp 0 -c:v libx264 -preset veryslow "$1".mkv } When you type sreq /path/to/filename it would become ffmpeg ..(redacted)... /path/to/filename.mkv


0

The iwm driver is not in the GENERIC kernel. The man page man iwm specifies the methods required to pull the driver in. Either: build a custom kernel load at boot time with /boot/loader.conf load at runtime with kldload The man page does not appear to be online - but it is in the latest snapshot.


2

Perhaps you ran a subshell from an editor, and it left the terminal in the alternate screen. You can test that by tput rmcup which would return to the normal display. While in the alternate screen, some terminals may override the scroll-wheel action by sending up/down cursor escapes.


4

This message comes from (perhaps other places) procps, which does a quick check to determine the screen width for ps command's notion of width. procps makes this check in set_screen_size, e.g., if the screen size is too small to print anything useful: if((screen_cols<9) || (screen_rows<2)) fprintf(stderr,"Your %dx%d screen size is bogus. Expect ...


1

On your home computer, before starting the job, launch =screen=: screen Then, from work or where ever, ssh into your home machine. Once in a shell, connect to the screen instance running there: screen -raAd That's -r[eattach] -a[ll capabilities] -A[dapt the size of the screen] -d[etach screen if running elsewhere] Do whatever you want to do in that ...


4

The venerable Gnu Screen can do what you want, but it can't attach to an already running gnome-terminal. You'll need to start screen at work if you want to pick it up later at home. See Session Management specifically.


8

The terminal description is named for Linux, which provides its own console emulator (as do several other kernels). Except for FreeBSD, all of the Linux- and modern BSD-platforms get "termcap" by deriving it from the terminfo database in ncurses. Console entries are specific to the systems in which they are implemented (unlike many terminal emulators, ...


1

Per terdon's request, I am posting this comment as an answer, so that the question can be marked as "answered" Instead of relying on script logging, especially if this will eventually be a cron job, consider sending output and error messages to one or more designated files(s) in your php code. When you run it in cron, it will create a session log ...


1

I've had the same problem. My /etc/inputrc was configured correctly, but due to some strange reason I had skeleton configuration in ~/.inputrc which then disabled all the mappings in /etc/inputrc. So, my solution was: rm ~/.inputrc Hope, it helps somebody :)


1

You can get it from /dev/vcs1 (for the first virtual console (tty1)). cat /dev/vcs1 But chances are those lines are also in a log file. (check /var/log/messages, /var/log/kernel.log, /var/log/syslog for a start). You may also want to check the stdout/stderr of chrome which if you started it with your Windows manager, may be going to some file like ...


3

If you have fuser installed and have the permission to use sudo: for i in $(sudo fuser /dev/pts/0); do ps -o pid= -o command= -p $i done eg: 24622 /usr/bin/python /usr/bin/terminator 24633 ksh93 -o vi


2

I finally found an although very ugly way to figure out which process occupies the pseudo terminal pts/0. As Superuser I did cd /proc and entered the following bash command: for pid in [0-9]* ; do \ RES=`ls -l $pid/fd/* 2>/dev/null| grep pts/0`; \ if [ -n "$RES" ]; then echo "Process $pid owns: $RES"; fi; \ done This way I figured out that ...


0

You can use more $ cat file | more $ ./program | more It displays the output from the beginning and you can go down by pressing spacebar or return keys until you want to get. press q to quit. Also you can use a different terminal as terminator and configure it to display "n" lines as you wish.


2

That is actually four questions: How do I know their code points? Some sort of regex? How do I count how many character cells a string takes? How do I erase everything that was outputted? OP mentions xterm, but only the last two are possibly specific to xterm. For (1) and (2), the echo command is not much help. You are better off using printf, which ...


2

Probably you cannot. xterm (and the programs which act like it) makes a distinction between mouse operations with/without the shift modifier: the unshifted operations can be programmed, i.e., an application can send an escape sequence telling xterm to send back escape sequences for each mouse click. the unshifted operations cannot be programmed in this ...


3

If you have a suspicion that, such a thing, i.e., a long output, to happen, start your session by executing command script this will log all your screen output as well as what you type in to the terminal (caveat emptor, backspaces and other normally unprintable characters will make the file harder to read, if you are not careful). when you are done ...


3

In Debian, that is x-terminal-emulator: sudo update-alternatives --config x-terminal-emulator Further reading: Debian Alternatives System Virtual Package: x-terminal-emulator Debian Policy Manual: Chapter 11 - Customized programs


5

Ctrl+C (control character intr): It will send SIGINT signal to a process and usually application gets abort but the application can handle this signal. For example you can handle a signal with signal() function in C Language. Ctrl+Z (control character susp): It will send SIGTSTP signal to a process to put it in background and like SIGINT it can be handle. ...


1

When you run a new terminal emulator, that creates a new terminal (/dev/pts/NUMBER on Linux). A program doesn't have to be started by that terminal to output there (try running tty in a terminal, then in another terminal run echo hello >/dev/pts/NUMBER). So you can tell your Python script to read and write from the terminal; all you need is to find out ...


-1

Ubuntu 14.04 - this works just fine: htop --sort-key=PERCENT_MEM


0

http://www.dayid.org/comp/tm.html re-attach an attached session (detaching it from elsewhere) tmux attach -d OR tmux attach-session -d


6

Your shell's command line editor saved the space. In fact, it saved all of the characters you typed into it that made up the command line. I wonder if you might be under the impression that the shell knows what command to execute by reading back the contents of the screen just before executing the command. That's not the case. Moreover, terminals do not ...


0

The top manpage shows the Startup Defaults that are configurable from the commandline. The Cpu display is not one of them. Startup Defaults The following startup defaults assume no configuration file, thus no user customizations. Even so, items shown with an asterisk (’*’) could be overridden through the command- line. Global_defaults ...


1

Linux top has support for a configuration file (~/.toprc) which it can also write from running configuration: start top enable the options you want (colors, update frequency, sort order, statistics displayed, ...) hit W (that is, shift+w) Next time you run top, it will read your configuration and change its defaults to what you asked.


0

Another option is to use an API token... I use the following on our internal gitLab server snippet: #!/bin/bash myemail="first.last@domain.com" # User API token can be found: "https://git.labs.domain.com/profile/account" git_api_token="m3iP27Jh8KSgNmWAksYp" # We'll use the HTTPS to push a ssh key to git, SSH for pull/push configuration ...


0

@Michael Homer answered my question. The code is: sudo chmod a-x /Applications/'Whatever Application' The code works perfectly and the Application cannot be opened.


6

The kernel's terminal driver (termios) interprets the special keys that can be typed to send a signal to a process, send end of file, erase characters, etc. This is basic Unix kernel functionality and very similar on most Unix and Linux implementations. The stty command displays or sets the termios special characters, as well as other parameters for the ...


3

Assuming you're using bash: Try hitting ^Z (i.e., Ctrl-Z) to stop the process, move it to the background, and get another bash prompt. Type fg; not, the former continues the stopped process and returns when it finishes. Alternatively, figure out the proces id of the program you want to wait for, assume it's 2342. In a new shall, type until kill -0 2342; ...


-2

From http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/ Command Editing Shortcuts Ctrl + a – go to the start of the command line Ctrl + e – go to the end of the command line Ctrl + k – delete from cursor to the end of the command line Ctrl + u – delete from cursor to the start of the command line Ctrl + w – delete from ...


6

Use shopt -q: shopt -q extglob && echo enable || echo disable -q option make shopt discard output, and return status to indicate that options set or unset.


6

Just run: $ shopt extglob It will return the current status: $ shopt extglob extglob on $ shopt -u extglob $ shopt extglob extglob off To who all options, just run: $ shopt


0

One possible (hacky) answer to my own question: On iPad (or whatever tablet), SSH into laptop On iPad, run screen -S ipad On laptop, open a terminal window Run screen -x ipad Make the terminal window as small as possible, and move it off to the side Now you can effectively capture your laptop's keyboard entry by just tabbing to the almost-minimised ...


1

From Bash Manual > History Expansion: Event Designator ! Start a history substitution, except when followed by a blank, newline, carriage return, = or ( (when the extglob shell option is enabled using the shopt builtin). !n Refer to command line n. Word Designators $ The last word. This is usually the last argument, ...


1

There are a few separate terms here that need to be independently defined: Terminal: A real keyboard/monitor interface, like the VT100: https://en.wikipedia.org/wiki/VT100 Terminal emulator(TTY): Emulates a terminal, providing input and output. Press ctrl+alt+F2 in most Linux distros, and you'll be in one. Type "w" in the terminal, and you'll see your w ...


1

A (display) terminal is a piece of hardware which has a keyboard and display, and communicates with a host computer. The terminal is itself a small computer; an embedded system. A terminal emulator is software running on a general-purpose machine which implements the behavior of some terminal. Terminal emulators are not all graphical. They can be based on ...



Top 50 recent answers are included