 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

22nd May 2012, 04:16 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
Problem with terminal and bash
In a very terrible happening some directories in /usr/lib deleted and so lot of my apps settings backed to default ( Google chrome , Firefox , Gtk windows settings and ... )
and when I opened my terminal I realized that it starts by an different thing that it always used to start
( I have the same problem with my Guake terminal emulator )
It always starts with this command :
Code:
[programmer@localhost programmer]$
but now it starts like this :
and when I use su command to become root It fixes again !! :
Code:
bash-4.2$ su
Password:
[root@localhost programmer]#
What is the problem ? Pls help
Last edited by Programmer; 22nd May 2012 at 04:18 PM.
|

22nd May 2012, 04:35 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,716

|
|
|
Re: Problem with terminal and bash
The shell prompt is controlled by the PS1 shell variable. The Fedora default is "[\u@\h \W]\$" (i.e. [user@hostname working_dir]$/#).
If you've deleted parts of /usr/lib, you'd be best off just reinstalling as fixing that manually will be tedious and error-prone, and probably take longer...
|

22nd May 2012, 04:42 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
|
Re: Problem with terminal and bash
Quote:
Originally Posted by Gareth Jones
The shell prompt is controlled by the PS1 shell variable. The Fedora default is "[\u@\h \W]\$" (i.e. [user@hostname working_dir]$/#).
If you've deleted parts of /usr/lib, you'd be best off just reinstalling as fixing that manually will be tedious and error-prone, and probably take longer...
|
Do you mean re-installing fedora !!!!    I can not do this because I have some apps on it that it will take a long time to install them ... no dude ... isn't there any way ? isn't any way to fix it ?
|

22nd May 2012, 04:46 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,716

|
|
|
Re: Problem with terminal and bash
There is, but you'll have to figure out what packages provided the deleted files and "yum reinstall ..." them. You can use the "rpm --verify ..." command to verify installed packages, but I don't know the details off-hand I'm afraid (in a bit of a rush at the moment).
|

22nd May 2012, 04:58 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
Re: Problem with terminal and bash
Quote:
Originally Posted by Gareth Jones
There is, but you'll have to figure out what packages provided the deleted files and "yum reinstall ..." them. You can use the "rpm --verify ..." command to verify installed packages, but I don't know the details off-hand I'm afraid (in a bit of a rush at the moment).
|
I have a Live DVD of Fedora , Isn't there any way to copy some system files that are important to my local Fedora ?
|

22nd May 2012, 05:12 PM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,608

|
|
|
Re: Problem with terminal and bash
Ehm, just as info..
There are chances to that PS1 in several locations like:
/etc/bashrc
~/.bashrc
~/.bash_profile
Be sure to check them, before massiv reinstallation of anything.
Just a simple typo could have brought you to where you are now.
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle fedora-rawhide ; st iso dl-fed -respin && st iso usb
|

22nd May 2012, 05:38 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
|
Re: Problem with terminal and bash
Does this changes that has happened to my OS ( Or deletion of some files in /etc/lib ) cause bad effects ?
Do I have do any thing ? or they are not important and do not take me into terrible ?
If it's possible to reinstalling something then this terminal and bash problem will fix, Please tell me because It makes me feel bad!!
Last edited by Programmer; 22nd May 2012 at 05:45 PM.
|

22nd May 2012, 07:08 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,110

|
|
|
Re: Problem with terminal and bash
/etc holds system wide configuration data.
So yes, loss of files anywhere in that directory tree can cause bad things to happen.
IF yum works (note there is /etc/yum for configuration) then you can safely reinstall any package you want - use the "reinstall" option. This will replace all files of the corresponding package, and recreate any missing ones.
|

22nd May 2012, 07:38 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 266

|
|
|
Re: Problem with terminal and bash
are those "deleted" files in your Trash? (as they are system files, it's likely they may be in Roots' Trash, but you'd have to log in as root (su) to see them). If so, you _MAY_ be able to restore them. A lot depends on what you've done before/since you wrote your question.
"Does this changes that has happened to my OS ( Or deletion of some files in /etc/lib ) cause bad effects ?" I think you know that answer now. I had a friend who bought an Apple, then deleted all the stuff she didn't need. It froze on the very next boot-up - SHE didn't need those files, but the Operating System did! Incidentally, a LOT of us learn exactly this way. There are places you just don't even 'visit'. Hope you get your stuff back!
---------- Post added at 02:36 PM ---------- Previous post was at 02:18 PM ----------
Oh, duh! I don't recall seeing what Fedora version you are running, but if it's Fedora 16 - I have saved myself a system catastrophe by sticking in the Fedora 16 install disk and doing an Upgrade. THEN, before trying to do ANYTHING with the system or any app, running all the UPDATES (yum update).
Don't know what version changed this, but I know some previous version (and prior) wouldn't allow you to Upgrade a current system.
- Hey - it's worth a try. If you're not running 16, then PERHAPS and Upgrade could save you (or maybe make things worse???).
---------- Post added at 02:38 PM ---------- Previous post was at 02:36 PM ----------
Be careful - UPGRADE is the option (and it is several screens into the process).
|

22nd May 2012, 07:40 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
|
Re: Problem with terminal and bash
Thank you for your answers
The files that have deleted from my /etc/lib , I realized that they were depend on Node.js and so I reinstall Node.js and every thing fixed ...
But some directories and files in my /usr/lib have deleted and I am very afraid about them , I don't think the files in /usr/lib are very important ? ( Are they ) , and when I restart my laptop some of my apps settings have became to default settings and actually GNOME settings have became to default ( I set them again!! ) . Will these files cause bad things? I mean files which have deleted from /usr/lib ?
My problem about the terminal and bash that I described in the first post of thread still not fixed ... is there any way to fix it ? I am sure this problem is because of the files that have deleted from /usr/lib but I don't know are these changed important or not ?
Last edited by Programmer; 22nd May 2012 at 07:42 PM.
|

22nd May 2012, 07:51 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 266

|
|
|
Re: Problem with terminal and bash
/usr/lib files are VERY important. You can look in there, but "don't touch". Those are 'System files'.
As mentioned, check the "Trash".
--
If you get your stuff back, you ought research Linux directories/folders and their purposes before you do any more 'editing'. {Been there/done that!}.
|

22nd May 2012, 08:15 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
Re: Problem with terminal and bash
Quote:
Originally Posted by lightman47
/usr/lib files are VERY important. You can look in there, but "don't touch". Those are 'System files'.
As mentioned, check the "Trash".
--
If you get your stuff back, you ought research Linux directories/folders and their purposes before you do any more 'editing'. {Been there/done that!}.
|
Please be serious and don't kidding with me ... My heart is not strong !
all files in my /usr/lib are not delete completely , some of them are deleted ...
Actually I don't know which ones , But I know some of us
I run this command for deleting all folders in a directory in /usr/lib
Code:
# cwd
/home/programmer
# rm -rf /usr/lib/my_exam_app
And then I got a chance that one of the files depend on google chrome didn't allow me to delete it and so the operation canceled and some others rescue !!!
What should I do ? Please don't say me I have to reinstall Fedora because I do not love that!
The only problem that has happened by this deletion is the problem that I said in the first post of the thread ...
Please help me to solve that problem ...
pls
Last edited by Programmer; 22nd May 2012 at 08:22 PM.
|

22nd May 2012, 08:31 PM
|
 |
Registered User
|
|
Join Date: Sep 2009
Posts: 1,409

|
|
|
Re: Problem with terminal and bash
If you are certain the command you ran was:
Code:
# rm -rf /usr/lib/my_exam_app
,
you couldn't have removed any system files. The only files you removed were conatined in the subfolder, my_exam_app.
As mentioned earlier, the locations mentioned by sea are the most likely places to have caused problems with the command line prompt.
dd_wizard
---------- Post added at 12:31 PM ---------- Previous post was at 12:27 PM ----------
If you accidently put a space immediately after "/usr/lib", all bets are off. I did something like that once when I tried to clean /tmp as root and put a space between / and the word tmp...  That's the day I learned to really appreciated backups!
dd_wizard
|

22nd May 2012, 08:32 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 266

|
|
|
Re: Problem with terminal and bash
my response WAS serious! Leave the /usr folder and sub-folders alone! There are also MANY others you shouldn't be 'fiddling with'. For instance, /etc contains all the SETTINGS files for your system. You may CAREFULLY Edit some of them (after you do the research as to what files and what edits!!) There are a lot of other folders you don't want to "adjust"!
If you get this back, do some research on Linux file systems and what they are/do. To draw a 'parallel' - you deleted stuff from \Windows\System32 - and are now scrambling to get it back. We're trying to help you, but you may indeed have to re-install. I hope you don't with the advice of the others here.
Last edited by lightman47; 22nd May 2012 at 08:41 PM.
|

23rd May 2012, 06:40 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Kashan
Posts: 31

|
|
|
Re: Problem with terminal and bash
Quote:
If you are certain the command you ran was:
Code:
# rm -rf /usr/lib/my_exam_app
,
you couldn't have removed any system files. The only files you removed were conatined in the subfolder, my_exam_app.
|
my bad on this , I did :
Code:
# rm -rf /usr/lib/my_exam_app *
      
Will this command influence the file and directories in /usr folder ? is it recursively go to /usr ?
( I want to know have some my files and folders in /usr folder been deleted or not ? )
------------------------------------------------------------------------------------
Quote:
|
my response WAS serious! Leave the /usr folder and sub-folders alone!
|
All of my files in /usr/lib have not deleted and I read something on a website that if system have restarted successfully after that deletion , It means that the important system files have not deleted but I will re-install fedora today   
------------------------------------------------------------------------------------
Can anyone say me how to fix below problem ? it's very important for me
Quote:
In a very terrible happening some directories in /usr/lib deleted and so lot of my apps settings backed to default ( Google chrome , Firefox , Gtk windows settings and ... )
and when I opened my terminal I realized that it starts by an different thing that it always used to start
( I have the same problem with my Guake terminal emulator )
It always starts with this command :
Code:
[programmer@localhost programmer]$
but now it starts like this :
bash-4.2$
and when I use su command to become root It fixes again !! :
bash-4.2$ su
Password:
[root@localhost programmer]#
and again by opening new terminal or by running exit command it appears
What is the problem ? Pls help
|
Pls help me  
Last edited by Programmer; 23rd May 2012 at 06:42 AM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 04:25 (Sunday, 26-05-2013)
|
|
 |
 |
 |
 |
|
|