Jump to content

linux shell script nwipe mass launcher

hello =)

 

got this little project im working on here started a part time job at this e waste recycling place and they throw away like 1000's of hdd because they can't wipe them at the rate they get them in so it makes me sick to my stomach

sooo iv been trying to come up with a way to stop it looked into a bunch of ways to do it anyway ended up with a copy of parted magic (linux distro obv) lol anyway the software its running is nwipe(more or less dariks boot and nuke)

i got it running today opened 2 copys (had to be ran at the same time before starting them otherwise you couldn't start all of the drives) so im working on a way to open multi tab windows running nwipe

 

and here is what i came up with(mind you i never tried to wright one of these before)

 


#!/bin/sh

WINDOW_NAME="ROXTerm"
PROFILE_NAME=Default

roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 1 --tab
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 2 --tab
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 3 --tab
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 4 --tab
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 5 --tab
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 6 --tab
enter
exit
enter

i have been testing it with something like this but it fails to load nwipe in each time im guessing theirs something i need to switch to the next tab to be able to right per tab but i

really dont know lol never tried to wright one of these before

 


#!/bin/sh

WINDOW_NAME="ROXTerm"
PROFILE_NAME=Default

roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 1 --tab
/usr/din/nwipe
enter
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 2 --tab
/usr/din/nwipe
enter
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 3 --tab
/usr/din/nwipe
enter
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 4 --tab
/usr/din/nwipe
enter
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 5 --tab
/usr/din/nwipe
enter
roxterm --profile=$PROFILE_NAME --title=$WINDOW_NAME -n 6 --tab
/usr/din/nwipe
enter
exit
enter

 

ty for any help you could give =)

Link to comment
https://linustechtips.com/topic/668882-linux-shell-script-nwipe-mass-launcher/
Share on other sites

Link to post
Share on other sites

your right it dose the problem however is when a drive fails finding which one failed isn't possible doesn't show which one failed just that there was a fail

 

thats why were splitting them up atm

 

 

the ideal is to stop them from being destroyed lol so shattering the disk wouldn't work lol

 

Link to post
Share on other sites

Given that you're running what is basically the same thing many times, you could use a loop instead of writing out every command individually.


for ((i = 1; i <= maxIterations; i++))

do

your thing

done

 

i starts at 1, goes up in steps of 1 per time around the loop, and it will stop when i gets to the maxIterations.

AMD Ryzen 7800 X3D, MSI B650 Project Zero, Antec C5, Gigabyte RTX 4080 Super Aero

 

Nikon D500 | Nikon 300mm f/4 PF  | Nikon 200-500 f/5.6 | Nikon 50mm f/1.8 | Tamron 70-210 f/4 VCII | Sigma 10-20 f/3.5 | Nikon 17-55 f/2.8 | Tamron 90mm F2.8 SP Di VC USD Macro | Neewer 750II

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×