accidental "cd Desktop; rm -rf ", now everything is sloooww..
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
accidental "cd Desktop; rm -rf ", now everything is sloooww..
I'm so embarrassed. I've been using Slackware for nearly ten years. I'm no guru but I've never accidentally deleted anything. I was writing a script to:
cd ~/Desktop/
mkdir stuff
[do things]
cd stuff
rm -rf *
I misspelled the "stuff" in "cd stuff" so it did "rm -rf *" while in the Desktop directory.
Now everything runs slowwwww. Opening a text file takes a few seconds and when I click on the X to close a window, it also takes a few seconds.
I'm on Slack 12 and need to upgrade anyway but won't have time for a few days. Is there something in the Desktop directory that would cause everything to run very slowly? I can hear my cpu fan running, which only happens under a heavy load, but I have tons of free memory and top doesn't show anything unusual.
Also, tried restarting X and rebooting but it still acts slow. (sorry for a bunch of edits, I'm having trouble posting this because it hung and somehow accidentally hit "submit" while typing)
Oh good grief, nevermind. I had a script that runs in a "while true" loop to restart another script in case it crashes. The second script was on the Desktop so the loop was dragging everything down, not to mention generating a nice big error log.
Is there anything else important on the Desktop that might cause errors after being deleted or should I be safe until I can upgrade?
Oh good grief, nevermind. I had a script that runs in a "while true" loop to restart another script in case it crashes. The second script was on the Desktop so the loop was dragging everything down, not to mention generating a nice big error log.
Is there anything else important on the Desktop that might cause errors after being deleted or should I be safe until I can upgrade?
When you're going to run a script in a loop to execute something, it's a good idea to test to see if the file exists. If the file doesn't exist or you just restarted some process, then have the script sleep for a while. Then even if the problem can't be resolved, it won't hog the CPU.
I get lazy sometimes writing shell scripts (I don't write them often) and get bitten by that sort of problem myself.
Thanks all, everything seems to be fine. I've never paid any attention to those .desktop files or anything else associated with it and didn't know if there was anything important there. I knew I could create a new user with a new Desktop but I've been wanting to repartition hda and do a fresh install/upgrade anyway so this is a good excuse.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.