299792458ms@lemmy.zip to linuxmemes@lemmy.world · 1 day agoTinkering Buglemmy.zipimagemessage-square21fedilinkarrow-up1324arrow-down12file-text
arrow-up1322arrow-down1imageTinkering Buglemmy.zip299792458ms@lemmy.zip to linuxmemes@lemmy.world · 1 day agomessage-square21fedilinkfile-text
minus-squareNegativeLookBehind@lemmy.worldlinkfedilinkEnglisharrow-up22·edit-219 hours agoWrite a script to delete every 5th file under /etc/. EDIT: did it for you #!/bin/bash count=0 for file in $(find /etc/ -type f); do (( count+=1 )) if (( $count % 5 == 0 )); then sudo rm -rf $file fi done And now you have lots of stuff to fix and configure. You’re welcome!
minus-squareMajorHavoc@programming.devlinkfedilinkarrow-up11·1 day agoWell that just got added to my interview question bank…heh.
sudo rm -rf /
Write a script to delete every 5th file under /etc/.
EDIT: did it for you
#!/bin/bash count=0 for file in $(find /etc/ -type f); do (( count+=1 )) if (( $count % 5 == 0 )); then sudo rm -rf $file fi done
And now you have lots of stuff to fix and configure. You’re welcome!
hi satan
Bonjour
Well that just got added to my interview question bank…heh.