Hey folks, we just have installed this question and answer script on our site. Please let us know if there are any errors.

Dear all, my linux prompt has the following problem:[john@johnPC ~], so when I change directory it also changes directory which is wrong e.g. directory: kerberos, cd kerberos--->the prompt shows [john@johnPC kerberos] , which is wrong. Also, I am using Fedora and the system has started slowing down very much and I do not know why. I have checked the processes and none use more than 0.7% of the memory (furthermore I would not like to delete a process as a root-but this is not a problem at the moment). So it stops upon opening on cups, on transmitting e-mails (I have no network connection on the laptop, it even stop for 3-4 minutes when I enter my password before opening Fedora and it even has problems opening a shell. If it is a problem of the fedora software and reinstallation is needed than this is a very serious problem for me (for many reasons among which the fact that I have a background in biology). I look forward to hearing from you, respectfully, Maria

asked 13 Jun '11, 13:35

mariak's gravatar image

mariak
1111
accept rate: 0%


If you don't like Bash Prompt to display the directory delete 'w' form the variable $PS1. It will in your ~/.bashrc , ~/.bash_profile OR /etc/profile.

You can type 'echo $PS1' at the bash prompt to display the variable value. For example mine shows: echo $PS1 [e]0;u@h: wa]${debian_chroot:+($debian_chroot)}u@h:w$

That answers your first trouble.

link

answered 17 Jun '11, 03:26

sach1n's gravatar image

sach1n
1
accept rate: 0%

Be specific about the Fedora version

link

answered 17 Jun '11, 03:27

sach1n's gravatar image

sach1n
1
accept rate: 0%

You can disabling unwanted services in Fedora

type 'service servicename stop'

EX: service squid3 stop

that will disable my squid proxy server.

link

answered 17 Jun '11, 03:31

sach1n's gravatar image

sach1n
1
accept rate: 0%

Dear sach1n, thank you for your replies. My Fedora version is old and I would not like to change that for the moment it is Fedora 7. Why do you mention about your proxy server? what is all this with the voting? I don't really like very much voting...in such cases. Maria

link

answered 17 Jun '11, 11:23

mariak's gravatar image

mariak
1111
accept rate: 0%

Hi Guys, I have to right the HAngman on Bash script and I Try to run it, but I dont get it, Can some look at the script and tell me what going wrong...thx in advance... Abdel

============================================== PATH=/bin:/usr/bin ; export PAT

The name of the file we are fetching - used all through the script.

The name of the directory inside the tar file; do not overwrite it.

filename='.hangman' tardir='hangman'

Validation Section

current dir must have write and execute permissions

if [ ! -w . -o ! -x . ] ; then echo 1>&2 "$0: current directory . missing write or execute permissions" exit 1 fi

do not overwrite any existing pathnames in current directory

if [ -e "$filename" ] ; then echo 1>&2 "$0: a pathname '$filename' already exists here; nothing done" exit 2 fi

if [ -e "$tardir" ] ; then echo 1>&2 "$0: a pathname '$tardir' already exists here; nothing done" exit 3 fi

Processing Section

fetch the mystery file and make sure the fetch got a non-empty file

wget http://teaching.idallen.com/dat2330/04f/notes/"$filename" || exit 4

if [ ! -s "$filename" ]; then echo 1>&2 "$0: the downloaded '$filename' file is missing or empty" echo 1>&2 "$0: nothing done" exit 4 fi

Do the correct series of decompress steps to get to the tar archive.

mv "$filename" "$filename.bz2" || exit 5 bunzip2 "$filename.bz2" || exit 5

mv "$filename" "$filename.gz" || exit 5 gunzip "$filename.gz" || exit 5

mv "$filename" "$filename.bz2" || exit 5 bunzip2 "$filename.bz2" || exit 5

mv "$filename" "$filename.gz" || exit 5 gunzip "$filename.gz" || exit 5

mv "$filename" "$filename.bz2" || exit 5 bunzip2 "$filename.bz2" || exit 5

mv "$filename" "$filename.bz2" || exit 5 bunzip2 "$filename.bz2" || exit 5

mv "$filename" "$filename.gz" || exit 5 gunzip "$filename.gz" || exit 5

Expand the tar archive into the current directory.

Make sure a $tardir directory results.

Remove the tar file.

tar xvf "$filename" || exit 6 if [ ! -d "$tardir" ] ; then echo 1>&2 "$0: cannot find '$tardir' after expanding '$filename'" exit 7 fi rm "$filename"

echo "The '$tardir' directory is ready for you: cd $tardir"

Optional: Add write permissions for owner.

(Modifying the code is difficult if write permissions are missing.)

chmod u+rwx "$tardir" || exit 8 chmod u+rw "$tardir"/* || exit 8

script exits with the return code of the last command executed

link

answered 28 Nov '11, 12:34

Harraz's gravatar image

Harraz
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×6
×1
×1
×1

Asked: 13 Jun '11, 13:35

Seen: 2,342 times

Last updated: 28 Nov '11, 12:34

we use OSQA