LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-13-2007, 06:40 AM   #1
firstlastcase
LQ Newbie
 
Registered: Jun 2007
Posts: 11

Rep: Reputation: 0
unintentionally, usr folder is missing what to do?


hi all,
i was browsing the / folder and unintentionally i dragged the "usr" folder into somewhere .. propably the var folder ..
>>
the gui now is not working correctly
and i cant use th "find" command to look for the "usr" folder because it is in it!
i tried to search for it manually ,,, but with no use ..
i didnt find it

i need to find so that the system works good..
besides i need the kernel source code folder (/usr/src/linux-version) to install the driver of the nic card ..

please help to solve this issue ..

thanx alot
 
Old 06-13-2007, 06:53 AM   #2
aaargh486
LQ Newbie
 
Registered: Jun 2007
Location: Huizingen, Belgium
Distribution: Ubuntu 7.04
Posts: 20

Rep: Reputation: 0
What distribution where you using?
Also, Linux was designed to make mistakes like this impossible. If you were able to delete/move your usr folder, you were most likely logged as root. You should never login as root, use sudo or su.
If you can't find it back, maybe you can browse every folder and use "ls | grep usr" to retrieve it. Good luck!
If you can't find, you can better just reinstall your system. It seems to me that you haven't got it that long installed anyways.
 
Old 06-13-2007, 06:55 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You found out a reason why it isn't a good idea running as root.

You can enter a pseudo terminal by entering [CTRL]-[ALT]-F2.

Then use the find command to locate the /usr directory:
find / -type d -name "usr"
 
Old 06-13-2007, 07:12 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
An alternative method would be to boot using a live cd, mount the partitions of your installation and then use find to search for where you put usr and then move it to the right place.
 
Old 06-14-2007, 03:00 AM   #5
firstlastcase
LQ Newbie
 
Registered: Jun 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Resolved

Thanx all,

this issue was resolved by copying the contents of the bin and sbin folder which are inside the usr folder from another linux system into the defected one and using the find command ..
i found the lost folder in the .Trash folder .. i moved it into its place..
restart ..
everything went back fine

thanks for posting

Abdullah Ali
 
  


Reply



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
Deleted the /usr/src/kernels Folder ??? 09-sparky Linux - General 3 01-22-2006 08:25 AM
cant modify /usr/local/bin folder surgey Linux - Newbie 4 05-10-2005 05:52 PM
I can't find my usr/src/linux folder r00k2oo4 Linux - Newbie 4 10-19-2004 09:42 AM
can't copy folder to usr/local ontwolf Linux - Hardware 5 04-23-2004 12:56 PM
my /usr/src/linux folder is empty rokga Linux - Newbie 2 10-07-2003 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:14 PM.

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