## Perl Objects
Perl objects start with **variables** progress to **blocks** where variables are used in a expression context as encountered from one statement to next.
-Grouped and reused operations are called **subroutines**. Subroutines choice of use is, is incredibly in many ways flexible further. Where they can be void, functions and even method like, when used in a **package** object. Beside packaging your variables and subroutines for reuse into a single object. It is worth mentioning, that packages can be placed into modules, for further better organization, however modules are not objects.
+Grouped and reused operations are called **subroutines**. Subroutines choice of use, is incredibly in many ways flexible further. Where they can be void, functions and even method like, when used in a **package** classed object. Beside packaging your variables and subroutines for reuse into a single object. It is worth mentioning, that packages can be placed into modules, for further better organization, however modules are not objects.
+
+### What is Classes, Methods, Functions, Instances in Perl?
+
+An Perl object is an instance, where the package name encountered in an source file can be referred to as an class.
+The default package name is called **main**, where its subroutines can be called any time if in scope of the package is being called.
+After being however; sequentially and before hand as such declared.
+
+These scopes or blocks is the main life and way how variable lifetime persists or exists.
+Nested scopes redeclaring some variable takes over; but doesn't over write the parent scope declared variable. How good or wise is that? Depends on intended implementation. Do we want a lot of variables, when can reuse a variable or have an global shared variable, that in nature is not protected.
+To make it protected sure would mean is to make it constant. So many options and situation. In OOP this is solved from structs to classes separation, than neatly placed into its own little file. However one year later into the project. Your simple let's say 1000 lines standard application in Perl, in the OOP provided solution, has 100 files in its folder, meaning possible over 100 instances of objects.
+
+How efficient is the loading of all these files, speed and on the fly interpreting code from the CPU point of view is of less of concern. Important is that the job is done. Yes of course. OOP doesn't care about number of files, variables, or some compilation can take hours. The running of the compiled is what is important to run fast and efficient. Perl goes there in the other direction, it cares. Because runs on the fly while compiling as an interpreted language. Compiles in own bytcodes that with an monolithic scoped object approach has thrown in also an automatic garbage collector into the mix. All at the same time.
+
+To have an method in perl the subroutine needs to be made to receive as an first argument its package instance or if statically called its package name.
+Static package calls have **::** the scope resolution operator. Between the package name and its scope insides.
+Instance or objects more suitable functions are called as methods. Using the arrow **->** dereferencing operator.
+Functions or methods are synonymous actually the same one thing, and that is the subroutine. What is disliked when coming from the OOP camp. Especially when it comes apparent to the developer; is that subroutines always return by default the last operation in its scope, Perl yikes also can return multiple type of values,and there readability when encountered, most people will make cringe.
+
+But every why, has its because that can make sense. Convention is to always use the return keyword from an method, especially an static function.
+
+If making modules, in perl it is an cringe, if asn exit keyword is encountered. Only the main can contain and should exit your program.
### Variables
-* Global variables are package variables, the most primitive and default package is called ```main::```. Your script runs in it, I can bet on it.
+* Global variables are package variables, the most primitive and default package is called ```main::```.
* Lexical variables are part of a block, their life starts in it and ends, declared by **my**, **local** or **state**, and are initialized by the type of data they represent.
* Basic Variable Data Types are:
* `$` Scalars
--- /dev/null
+
+# Linux Useful Utilities
+
+
+<!-- @import "[TOC]" {cmd="toc" depthFrom=1 depthTo=6 orderedList=false} -->
+
+<!-- code_chunk_output -->
+
+- [Linux Useful Utilities](#linux-useful-utilities)
+ - [IO Monitoring](#io-monitoring)
+ - [iotop](#iotop)
+ - [dstat](#dstat)
+ - [Tar Pipe to Server via SSH](#tar-pipe-to-server-via-ssh)
+ - [hdparam](#hdparam)
+ - [lshw](#lshw)
+ - [Automatic ssh Setup](#automatic-ssh-setup)
+ - [Securing SSH Keys: Protection Against Key Compromise](#securing-ssh-keys-protection-against-key-compromise)
+- [Example alias](#example-alias)
+- [Just run "ssh serverprod"!](#just-run-ssh-serverprod)
+- [Access localhost:8080 on server after tunnel setup](#access-localhost8080-on-server-after-tunnel-setup)
+- [Backup script runs nightly via SSH](#backup-script-runs-nightly-via-ssh)
+- [Enable bright colors](#enable-bright-colors)
+- [Delete Files via FZF tab selection.](#delete-files-via-fzf-tab-selection)
+
+<!-- /code_chunk_output -->
+
+
+
+## IO Monitoring
+
+```sudo pidstat -dl 30```
+
+ Accumulate IO read/write for every 30 seconds.
+
+### iotop
+Installation:
+
+ sudo apt install iotop
+
+Run:
+
+ sudo iotop -o -a
+
+### dstat
+
+> pcp-dstat - versatile tool for generating system resource statistics.
+
+Run:
+
+```dstat --disk --fs --top-io -n```
+
+### Tar Pipe to Server via SSH
+
+ > Backup an whole folder to an remote server location.
+
+
+```
+tar --exclude=".cache" --exclude="/.vscode" -cJvf - /home/user1 | ssh user1@some.server "cat > ~/backups/user1_workstation_home.tar.xz"
+```
+
+```
+XZ_OPT=-e3 tar --exclude=".cache" --exclude="/.vscode" -cJvf - VIDEOS/ | buffer -z 500K -p 75 | ssh will@elite "buffer -s 500K -p 75 | cat > ~/backups/nomad_data_VIDEOS.tar.xz"
+```
+
+### hdparam
+>The hdparm command is a key tool for managing and optimizing hard drives in Linux, offering options to retrieve drive info, test read speeds, and adjust power settings.
+
+```
+sudo hdparm -Tt /dev/nvme1n1p2
+
+/dev/nvme1n1p2:
+ Timing cached reads: 18622 MB in 1.98 seconds = 9388.32 MB/sec
+ Timing buffered disk reads: 4374 MB in 3.00 seconds = 1457.75 MB/sec
+
+ ```
+
+ 
+
+### lshw
+>Display all disks and storage controllers in the system.
+
+```
+lshw -class disk -class storage
+```
+
+
+## Automatic ssh Setup
+>Password-less Remote Access steps.
+https://thelinuxcode.com/automate-ssh-login-without-password/
+
+1. Generate New SSH Key on Your Client
+ >Accept the default RSA algorithm and minimum 2048 bit key size, but choose an empty passphrase unless your security protocol demands otherwise:
+ ```ssh-keygen -t rsa -b 2048```
+ ...
+2. Copy Public Key to Remote Server
+ >``` ssh-copy-id -i ~/.ssh/id_rsa.pub remote_username@server_ip ```
+3. Celebrate with Password-less Remote Access!
+ >```ssh remote_username@server_ip```
+
+
+### Securing SSH Keys: Protection Against Key Compromise
+
+While incredibly useful, SSH keys do necessitate some care to avoid potential downsides from theft or misuse:
+
+ * Manage access rights to private keys with chmod 600 ~/.ssh
+ * Leverage SSH agent forwarding over copying keys between servers
+ * Store keys on hardware tokens for multi-factor protection
+ * Disable shells for automated SSH user accounts
+ * Monitor key changes carefully with centralized logging
+
+According to [SECURITY FIRM], at least 20% of corporate breaches involve stolen SSH credentials. But following guidelines like the ones above makes compromise extremely difficult.
+
+Moreover, the same public key cryptography powering SSH keys allows flexibility for specialized key pairs. For example, you can create:
+
+ User-specific keys granting least privilege access
+ Command-restricted keys to limit available actions
+ Temporary keys that automatically expire
+
+So while requiring some extra diligence, SSH keys provide scalable and secure authentication.
+Level Up Your SSH Game with Advanced Tips
+
+Now that you have unlocked the basics of passwordless SSH access, let‘s explore some ways to further improve your remote user experience:
+
+1. Configure aliases and concise connection settings in SSH config
+
+The ~/.ssh/config file allows shortcut aliases and options presets to simplify verbose SSH invocations:
+
+# Example alias
+Host serverprod
+ Hostname server.prod.example.com
+ User jsmith
+
+# Just run "ssh serverprod"!
+
+2. Forward remote ports for tunneling into internal networks
+
+SSH tunneling grants secure traversal of firewalls via forwarded connections:
+
+# Access localhost:8080 on server after tunnel setup
+ssh -L 8080:localhost:8080 remote_server
+
+3. Automate commands and transfers on remote hosts
+
+Combine passwordless SSH with cron jobs for scheduled script execution:
+
+# Backup script runs nightly via SSH
+0 1 * * * ssh remote_server ./backup.sh
+
+4. Control terminal settings like colors or cursor movement
+
+Customize your shell and text interface however you like:
+
+# Enable bright colors
+ssh remote_server -t ‘setterm -bold >&3‘
+
+The options for enhancement are nearly endless once the convenience of single sign-on is activated!
+
+# Delete Files via FZF tab selection.
+
+ls /Downloads/.nomad-*|fzf -m| tr "\n" "\0" |xargs -0 rm