Click name ↑ to return to homepage
rm myfile.txt
This removes the file. You can’t get it back.
This removes stuff in “mydir”:
rm -rf mydir/
But this removes stuff in the root directory (so, everything):
Don’t do this! :
rm -rf /
mv myfile.txt importantfile.txt
This will re-name myfile.txt to importantfile.txt
BUT: if importantfile.txt already existed, it will now be gone.
#!/bin/bash
while true
do
echo now in loop
sleep 1
done
This would be a bigger problem if, on each loop, output was created and stored.