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 email@example.com:/tmp/info.txt real example: pscp plot-k32-2021-06-19-16* firstname.lastname@example.org:/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 email@example.com:/mnt/ext-01
Showing posts from July, 2021
- Other Apps
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"
- Other Apps
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