Bash Promptless SFTP in bash script Want to run SFTP command in a bash script without being prompted? Here are quick examples of 2 approaches; one with password based authentication and one with private key authentication. Password Authenticationcd /source_directory_on_local echo "cd /target_directory_on_remote" > /tmp/commands.
Conda Conda: Environment configuration With a high probability, you own a powerful computing device that could be used as a standalone system for developing, debugging, and testing applications. And it would be a good idea - to use virtual environments to limit cross-project dependencies and keep your OS package list under control.
JSON JQ is a new GREP If you are a cloud system administrator, security analyst, or data scientist, you already use jq (JSON Query), and if you don't, you should.
Bash Bash scripts to diagnose network issues These are 2 simple scripts I wrote that run various types of tests to help diagnose network issues between a source and target. They can be safely run as a non-root user as long as the commands exist. Script 1 - Various network testsThis
Ansible Ansible: Dynamic Inventory I know that Ansible could use as inventory virtually anything, including scripts. However, all inventories on my day job are static, and we keep them in a source repository, and until now, I haven't had a chance to create or use one.
Bash Bash script to test port availability I created a quick script to test if a port is consistently available between a source server to a target server for the purpose of gathering statistics to see if there are any network hiccups not. This is a very simple and straightforward script.
SSH Unappreciated SSH Client Config Some IT folks how are fluent with the server configuration of the SSH daemon. But I can hardly name a few who knows how helpful client SSH configuration is.
Git Automate Housekeeping For one who does automation for living, it's okay to be a bit lazy. So let's talk about how I keep my local git repositories in order with minimal effort.
Linux Getting "Argument list too long" when using ls I was trying to count the number of files in a particular directory in Linux using the ls command and received the following error: oracle@soadev:/home/oracle> ls /u01/archive/*.* | wc -l -bash: /bin/ls: Argument list too longTurns out the resolution
Linux Find directories with largest number of files in Linux I needed to find the list of directories that had the largest number of files on my Linux file system, searching recursively through the filesystem. Here's the content you can paste in a script: #!/bin/bash if [ $# -ne 1 ];then echo "Usage: `basename $0`
OpenSSL Quick Certificate Validation Check certificate validity for a site; what could be easier? It's a click away if the address of interest is in your browser. Learn how you can check expiration dates for multiple Learn how you can check expiration dates for multiple host or virtual hosts with SNI.
Bash How to show a timestamp in Bash history By default, when you run the history command, it lists the history of all commands previously executed, but it does not include a timestamp. Adding a timestamp to the bash history can easily be accomplished with the HISTTIMEFORMAT Bash variable as shown. export HISTTIMEFORMAT=