Posts

Showing posts from July, 2021

Copying Files from Windows to Linux using PuTTY

Image
Copying Files from Windows to Linux using PuTTY   Reference : https://it.cornell.edu/managed-servers/transfer-files-using-putty You will need to have PuTTY installed on the Windows machine. PuTTY comes with some additional command-line tools. One is called "pscp" for PuTTY Secure Copy. This is the tool we'll use to copy the file from Windows to Linux.  From the command-prompt, browse to the Windows folder with the file to send.      pscp c:\info.txt userid@server.example.com:/tmp/info.txt      real example:      pscp plot-k32-2021-06-19-16* steve@192.168.1.145:/mnt/hdd-02 Note: You will be prompted for the password of the remote (Linux) system. You can pass that along as a part of the command also.     pscp -pw myPassword0!88 *.plot steve@192.168.1.135:/mnt/ext-01 Want to help support? Chia (XCH): xch1xz9g7cyy79vnrh6nuyh86jq4ps6ah2ny0ck2050wfqqfjwkyk0mqd89etp HDDcoin (HDD): hdd19vatjqxka49c5lht6nrf2cqc94va6rf9vv2mzu2793vq4dwq8wes842qff Bitcoin (BTC) no fee on Coin

Bash Script to pull Latest Chia price from CoinMarketCap

Image
 Bash Script to pull Latest Chia price from CoinMarketCap This Bash script will pull down the latest price for XCH from the CoinMarketCap and display it. Here is the script: #!/bin/bash # Get current price from CoinMarketCap content=`curl -s https://coinmarketcap.com/currencies/chia-network/` value=`echo $content | cut -d'$' -f 6 | cut -d'<' -f 1` echo "$value" Want to help support? Chia (XCH): xch1xz9g7cyy79vnrh6nuyh86jq4ps6ah2ny0ck2050wfqqfjwkyk0mqd89etp HDDcoin (HDD): hdd19vatjqxka49c5lht6nrf2cqc94va6rf9vv2mzu2793vq4dwq8wes842qff Bitcoin (BTC) no fee on Coinbase : 3ADGMs1i6MU8Bxnr8qC6CPmgTUAS6DevyT Etherium (ETH) no fee on Coinbase : 0x1F604e5a010f42F36e0C24868454f08056bc5B0A Venmo: @steppsr Cash App: $StevenStepp Paypal:

Bash Script to Monitor and delete old "OG" plots to make room for new NFT plots

Image
 Bash Script to Monitor and delete old "OG" plots to make room for new NFT plots This script uses crontab to monitor a folder containing the old non-poolable plots for Chia, aka OG plots. This only works if you have kept different types of plots in separate folders. The script does not check the plot type so be warned that if you use a folder with NFT plots, those will be deleted also. The script will delete plots when the amount of free space drops below 110,000,000 (110 GB).  Here is the script, called "drivemon.sh". #!/bin/bash drv=$1 free=`df --output=target,avail $drv | grep -v "Mount" | cut --fields 2 --delimiter=\ ` if [[ $free -lt 110000000 ]]; then # if free space is less than 110GB _and_ there are  # OG plots on the drive, delete the oldest plot. ogcount=`ls $drv/*.plot | wc -l` if [[ $ogcount -gt 0 ]]; then     rm "$(ls -t $drv/*.plot | tail -1)"   fi fi And the entry into crontab. (adjust the drive to match your needs) cr