Most Popular

1500 questions
77
votes
3 answers

OpenSSH: How to end a match block

I'm using a Match block in OpenSSH's /etc/ssh/sshd_config (on debian) to restrict some users to SFTP: # my stuff Match group sftponly X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp -u 0002 ChrootDirectory %h As…
mreithub
  • 3,543
  • 2
  • 18
  • 17
77
votes
4 answers

What's the newline symbol in zsh's PS1?

I'm trying to setup a multiple line PS1, for zsh, but \n doesn't was parsed by zsh, PS1="%~\n %> " How should I set it up?
daisy
  • 53,527
  • 78
  • 236
  • 383
77
votes
8 answers

How to make bidirectional pipe between two programs?

Everyone knows how to make unidirectional pipe between two programs (bind stdout of first one and stdin of second one): first | second. But how to make bidirectional pipe, i.e. cross-bind stdin and stdout of two programs? Is there easy way to do it…
user14284
77
votes
9 answers

Bulk rename, change prefix

How can I bulk replace the prefix for many files? I have a lot of files like TestSRConnectionContext.h TestSRConnectionContext.m I would like to change all them to CLConnectionContext.h CLConnectionContext.m How would I do this?
ErikTJ
  • 893
  • 1
  • 7
  • 6
77
votes
4 answers

Reply on same interface as incoming?

I have a system with two interfaces. Both interfaces are connected to the internet. One of them is set as the default route; a side effect of this is that if a packet comes in on the non-default-route interface, the reply is sent back through the…
Shawn J. Goff
  • 45,338
  • 25
  • 134
  • 145
77
votes
11 answers

Terminating an infinite loop

I have a command that I want to have run again automatically each time it terminates, so I ran something like this: while [ 1 ]; do COMMAND; done; but if I can't stop the loop with Ctrl-c as that just kills COMMAND and not the entire loop. How…
howard
  • 1,332
  • 1
  • 11
  • 16
77
votes
3 answers

What is the difference between ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.gnomerc, /etc/bash_bashrc, /etc/screenrc ...?

Answers to the questions on SO and askubuntu, along with poking through (and reading headers of) $HOME and /etc/, indicate a number of files that can be used to set environment variables, including: ~/.profile ~/.bashrc ~/.bash_profile…
Abe
  • 1,681
  • 2
  • 13
  • 8
77
votes
6 answers

Is there ever a reason to use scp instead of rsync?

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).
mikebloch
  • 889
  • 1
  • 6
  • 5
77
votes
2 answers

Debian: The repository does not have a Release file

Whenever trying to install some programs from source, or specifically running apt update, I receive this message: E: The repository 'http://ftp.ca.debian.org/debian stretch/updates Release' does not have a Release file. N: Updating from such a…
user77647
77
votes
4 answers

Linux: Kill process based on arguments

How can I kill a process based on its command line arguments? killall, pgrep, and pkill seem to only work based on the process name. I need this to be able to differentiate between a number of applications running inside Java virtual machines,…
Mark Howard
  • 873
  • 1
  • 6
  • 4
77
votes
3 answers

Is space allowed between #! and /bin/bash in shebang?

In a shebang, is a space or more allowed between #! and the interpreter? For example, #! /bin/bash. It seems work, but some said that it is incorrect.
Tim
  • 98,580
  • 191
  • 570
  • 977
77
votes
3 answers

Can I force dnf to install an old version of a package?

I want to install an older version of package , and when I use dnf it only shows the current version of the package . Is there any way to install an older versions using dnf ?
0x0584
  • 1,284
  • 2
  • 15
  • 23
77
votes
6 answers

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% available space. After searching for about an hour I saw…
piovisqui
  • 873
  • 1
  • 6
  • 6
77
votes
8 answers

Converting relative path to absolute path without symbolic link

Is there a Unix command to get the absolute (and canonicalized) path from a relative path which may contain symbolic links?
Benjamin
  • 1,505
  • 2
  • 18
  • 25
77
votes
3 answers

Refresh aliases and functions after defining new aliases and functions?

When I define a new alias in .bash_aliases file or a new function in .bashrc file, is there some refresh command to be able immediately use the new aliases or functions without closing the terminal (in my case xfce4-terminal with a few tabs open,…
xralf
  • 16,149
  • 29
  • 101
  • 149