One of the tutorials I've been following briefly stated that cd . has no use. When trying to replicate issue shown by OP in Symbolic link recursion - what makes it “reset”?, I also tried cd ., which showed the same effect OP described (growing $PWD…
Drectories contain . and .. which are hard links to the current and parent directory.
So how does the shell know for example in the prompt, that the current directory is called "a" in cd a/path/..? Does it have special casing for this?
Otherwise…
I have two PuTTy sessions open to the same host. One one cd ~ gets me back to my home dir fine and on another one it doesn't -- stays in the same dir.
I have never seen something like this happen.
Any idea why this might be happening?
OS: SunOS…
I wrote a script for the purpose of changing directory and then scan a file.
#!/bin/bash
model_dir=/mypath
function chdir () {
cd $1
}
chdir ${model_dir}/config
if [[ ! -s *.cfg ]]
then
echo `date` "configure file does not exist"
exit 1
fi
I…
I'm several child directories deep and I enter cd .. and receive this error:
cd: ..: No such file or directory
I am confused- of course there is a parent directory, I'm in it! A little digging shows that my coworker renamed a grandparent directory…
I want to go in the directory on the basis of highest directory number.
Path: /home/cg/root/2018/01. Inside this path I have multiple directories as below
15
16
17
So on..
In this case highest directory is 17 so I want to move in 17…
Put simply, I have a file on my desktop that I'm attempting to access using cd /file name and I'm returned with:
No such file or directory. I resorted to copying and pasting the directory (being mindful of current directory)
I get as far as /home…
The following commands does the same thing
$ cd
$ cd $HOME
$ cd ~
$ cd /home/user
In three of them, the path is relatively specified. But how or why in the earth the simple cd opens the user's home dir?
I downloaded this folder using
wget https://github.com/duxingkei33/orangepi_PC_gpio_pyH3
when I ls I can see the folder orangepi_PC_gpio_pyH3
however when I
cd orangepi_PC_gpio_pyH3
I get error:
-bash: cd: orangepi_PC_gpio_pyH3: Not a directory