LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-26-2009, 11:30 AM   #1
slide77
LQ Newbie
 
Registered: Jun 2007
Posts: 22

Rep: Reputation: 16
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)

Last edited by slide77; 12-26-2009 at 11:36 AM.
 
Old 12-26-2009, 11:46 AM   #2
slide77
LQ Newbie
 
Registered: Jun 2007
Posts: 22

Original Poster
Rep: Reputation: 16
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?
 
Old 12-26-2009, 02:38 PM   #3
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Rep: Reputation: 23
You should be ok.
By default there's nothing in Desktop but links to folders and trash.
Consider that an important lesson though.
 
Old 12-26-2009, 02:49 PM   #4
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by slide77 View Post
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.
 
Old 12-27-2009, 12:02 AM   #5
slide77
LQ Newbie
 
Registered: Jun 2007
Posts: 22

Original Poster
Rep: Reputation: 16
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidental deletion of "/usr/X11R6//lib/browser_plugins/" folder on FreeBSD. int80 *BSD 2 01-02-2009 10:19 AM
Which Ubuntu should I use "server" or "desktop" titosingh Linux - Newbie 2 05-07-2008 06:43 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
Accidental Deletion of "home.desktop" Ian Linux - Newbie 2 03-06-2004 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration