Astazi mi sa inchis serverul de cs si am crezut ca dat o eroare de la vreo harta ceva , dar nu a fost asa am incercat sa il repornesc si mi-a aparaut mesajul :
eroare la pornirea server-lui (sa zicem)
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
- tictac
- Membru eXtream
- Posts: 4015
- Joined: 24 Feb 2012, 18:27
- Detinator Steam: Da
- Reputatie: 1 warn scos (-2 luni club)
Membru Club eXtreamCS (3 luni)
Ban 3 luni (achitat) - Location: Bihor, Oradea
- Has thanked: 73 times
- Been thanked: 570 times
Ca esti tu destept deaia nu porneste :))...
oare l-ai instalat direct in root ? :> , ia verifica.
oare l-ai instalat direct in root ? :> , ia verifica.
- Andrei.B
- Fost administrator
- Posts: 6479
- Joined: 17 Aug 2009, 09:15
- Detinator Steam: Da
- CS Status: Plecat pe mari si tari
- Detinator server CS: Nu detin !
- SteamID: andreybci94
- Reputatie: Fost Membru Club eXtreamCS (o luna)
Fost Administrator
Nume anterior : bLack, Andrei,krusc
Contribuitor - Location: ConstanTa
- Has thanked: 275 times
- Been thanked: 557 times
2 down vote accepted
The options for any command line are expanded before the command is run, even for internal commands. Whatever shell you're using to run /bin/bash cd ~ is presumably interpreting the tilde literally rather than a special character that expands to your home directory.
As a test, try creating a directory by that name and see if the error goes away.
> mkdir ./~
> /bin/bash cd ~
Note that the cd command needs to be done within your running shell to be useful. When you change the working directory of a sub-shell, and then the sub-shell exits, you'll find yourself back where you started.
UPDATE:
From within a bash script, you should be able to use the $HOME environment variable, which should consistently contain your home directory. I'm not aware what conditions would cause tilde expansion to fail, but I've always used $HOME.
Also, when determining whether you can change into a particular directory, you have the option of being explicit and returning useful status:
unset err
if [[ ! -d "$somedir" ]]; then
err="Can't find $somedir"
elif [[ ! -r "$somedir" ]]; then
err="Can't read $somedir"
fi
if [[ -n "$err" ]]; then
echo "$ERROR: $err" >&2
exit 1
fi
cd "$somedir"
Or, you can just try the CD and look at its results.
if ! cd "$somedir"; then
echo "ERROR: $somedir not availble"
exit 1
fi
Detailed error reports are handy, but if you don't need them, keeping your code small has advantages as well.
The options for any command line are expanded before the command is run, even for internal commands. Whatever shell you're using to run /bin/bash cd ~ is presumably interpreting the tilde literally rather than a special character that expands to your home directory.
As a test, try creating a directory by that name and see if the error goes away.
> mkdir ./~
> /bin/bash cd ~
Note that the cd command needs to be done within your running shell to be useful. When you change the working directory of a sub-shell, and then the sub-shell exits, you'll find yourself back where you started.
UPDATE:
From within a bash script, you should be able to use the $HOME environment variable, which should consistently contain your home directory. I'm not aware what conditions would cause tilde expansion to fail, but I've always used $HOME.
Also, when determining whether you can change into a particular directory, you have the option of being explicit and returning useful status:
unset err
if [[ ! -d "$somedir" ]]; then
err="Can't find $somedir"
elif [[ ! -r "$somedir" ]]; then
err="Can't read $somedir"
fi
if [[ -n "$err" ]]; then
echo "$ERROR: $err" >&2
exit 1
fi
cd "$somedir"
Or, you can just try the CD and look at its results.
if ! cd "$somedir"; then
echo "ERROR: $somedir not availble"
exit 1
fi
Detailed error reports are handy, but if you don't need them, keeping your code small has advantages as well.
Mereu in suflet culorile ( Roş -Albastru )
- Nu fac parte din lista intermediarilor , asa ca nu ma mai contactati sa fiu intermediar la tranzactii. Lista o gasiti ( aici )
- Pentru orice problema pe forum va rog sa ma contactati folosind ( PM ) sau folositi http://www.extreamcs.com/forum/discutii ... 54287.html