xref: /DragonOS/tools/batch_delete_loop.py (revision fadeee36a2b6fea62becd2048a426f808a87304e)
1*e806bbc0Sfslongjinimport os
2*e806bbc0Sfslongjin
3*e806bbc0Sfslongjinstart = int(input("Start from: "))
4*e806bbc0Sfslongjinend = int(input("End at: "))
5*e806bbc0Sfslongjin
6*e806bbc0Sfslongjinfor i in range(start, end+1):
7*e806bbc0Sfslongjin    print("Deleting: " + str(i))
8*e806bbc0Sfslongjin    os.system("sudo losetup -d /dev/loop" + str(i))
9*e806bbc0Sfslongjinprint("Done!")