LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

BASH fork

Posted 04-05-2020 at 05:11 PM by karanis
Tags bash, fork

#!/usr/bin/bash
function_to_fork() {
...
}

function_to_fork &
# ... execution continues in parent process ...
LQ Newbie
Posted in Uncategorized
Views 211 Comments 0 karanis is offline
Old

nmap Scan Network (better&faster)

Posted 04-05-2020 at 05:10 PM by karanis
Tags bash, net

nmap -sL 192.168.*.* | grep \(1
ip neigh show dev eth1
LQ Newbie
Posted in Uncategorized
Views 259 Comments 0 karanis is offline
Old

non-Interactive self signed Certificate

Posted 04-05-2020 at 05:08 PM by karanis
Tags openssl

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
-keyout www.example.com.key -out www.example.com.cert
LQ Newbie
Posted in Uncategorized
Views 186 Comments 0 karanis is offline
Old

SSH : add a host to ~/.ssh/known_hosts

Posted 04-05-2020 at 05:06 PM by karanis
Tags ssh

ssh-keyscan -t rsa -H 192.168.2.124 >> ~/.ssh/known_hosts
LQ Newbie
Posted in Uncategorized
Views 142 Comments 0 karanis is offline
Old

POWER OFF spinning disk

Posted 04-05-2020 at 05:03 PM by karanis

If you are aware and paranoid on energy saving on spinning disks (which 'as they spin, they die sooner') like me, you may need :

# udisksctl power-off -b /dev/sdX

or

# hdparm -S 1 /dev/sdb

/* for hot plugs */
edit "/etc/udev/rules.d/45-sdX-power.rules" file
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTR{queue/rotational}=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"...
LQ Newbie
Posted in Uncategorized
Views 224 Comments 0 karanis is offline

  



All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration