Re: Removing pwd directory and su and cd .. issue



Javi Barroso wrote:
On Jun 10, 11:53 am, Janis Papanagnou <janis_papanag...@xxxxxxxxxxx>
wrote:
Javi Barroso schrieb:



Hi,
I'm wondering with this (I'm with bash 4.1.5(1)-release):
machine:~$ mkdir prueba
machine:~$ cd prueba
machine:~/prueba$ rmdir ~/prueba
machine:~/prueba$ su
Contrase a:
shell-init: error al obtener el directorio actual: getcwd: no se puede
acceder a los directorios padre: No existe el fichero o el directorio
machine:/home/user/prueba# cd ..
chdir: error al obtener el directorio actual: getcwd: no se puede
acceder a los directorios padre: No existe el fichero o el directorio
machine:..# cd ..
machine:../..# cd ..
machine:../../..# cd ..
machine:../../../..# cd ..
machine:../../../../..# ls
bin cdrom etc initrd initrd.img.old lost+found mnt proc
sbin srv tmp var vmlinuz.old
boot dev home initrd.img lib media opt root selinux
sys usr vmlinuz
machine:../../../../..# cd ..
machine:../../../../../..#
Is it a known issue or only happens in my computer?
Thank you!
It would help if you provide any error messages in English.
Ok, I'm sending it again
If switching user to 'root' gives an error you may inspect /etc/passwd
and check the home directory defined for root.
Error is "error retrieving current directory" because I deleted it
before invoke su

Then change directory to a known good directory using a full pathname.

cd /tmp


.



Relevant Pages