|
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 |
|
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. |
|
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 |
|
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 Sectioncurrent dir must have write and execute permissionsif [ ! -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 directoryif [ -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 Sectionfetch the mystery file and make sure the fetch got a non-empty filewget 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 |