Description | Command |
---|---|
Start a new session with session name | screen -S <session_name> |
List running sessions / screens | screen -ls |
Attach to a running session | screen -x |
Attach to a running session with name | screen -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this commands from user root | |
mkdir zabbix-agent && cd zabbix-agent | |
wget https://github.com/CHERTS/zabbix_44x_next/releases/download/v4.4.11/zabbix_agent-4.4.11-solaris-11.4-amd64-openssl.tar.gz | |
tar -vzxf zabbix_agent-4.4.11-solaris-11.4-amd64-openssl.tar.gz | |
cp bin/zabbix_* /usr/bin/ | |
cp sbin/zabbix* /usr/sbin/ | |
mkdir /etc/zabbix/ | |
cp conf/zabbix_agentd.conf /etc/zabbix/ | |
chmod -R 755 /etc/zabbix/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just some notes on enabling smart http with nginx as well as authentication on push for repos | |
# install git, cgit and apache2-utils (for authentication) | |
apt install git cgit apache2-utils fcgiwrap | |
# create a git user | |
adduser git | |
su git | |
cd | |
mkdir .ssh && chmod 700 .ssh | |
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are for cases where you know that the directory contains only regular files and that you want to process all non-hidden files. If that is not the case, use the approaches in 2. | |
All sed solutions in this answer assume GNU sed. If using FreeBSD or macOS, replace -i with -i ''. Also note that the use of the -i switch with any version of sed has certain filesystem security implications and is inadvisable in any script which you plan to distribute in any way. | |
Non recursive, files in this directory only: | |
sed -i -- 's/foo/bar/g' * | |
perl -i -pe 's/foo/bar/g' ./* | |
(the perl one will fail for file names ending in | or space)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install --http-proxy http://user:[email protected]:8080 bundler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y libaio1 alien | |
# Change version based on https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html | |
# Example alternative: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.5-basiclite-19.5.0.0.0-1.x86_64.rpm | |
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm | |
sudo alien -i --scripts oracle-instantclient*.rpm | |
rm -f oracle-instantclient*.rpm | |
# Optionally install SQLPlus | |
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm | |
sudo alien -i --scripts oracle-instantclient*.rpm |
Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '<14>_sourcehost_ messagetext' | nc -v -u -w 2 _desthost_ 514 | |
Example: | |
echo '<14>192.168.0.5 messagetext' | nc -v -u -w 2 192.168.0.105 514 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
NewerOlder