299792458ms to linuxmemes@lemmy.world · 1 month agoTinkering Bugimagemessage-square25fedilinkarrow-up1375arrow-down11file-text
arrow-up1374arrow-down1imageTinkering Bug299792458ms to linuxmemes@lemmy.world · 1 month agomessage-square25fedilinkfile-text
minus-squareNegativeLookBehind@lemmy.worldlinkfedilinkEnglisharrow-up29·edit-21 month 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-up13·1 month agoWell that just got added to my interview question bank…heh.
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!
Well that just got added to my interview question bank…heh.
hi satan
Bonjour