PDA

View Full Version : [ubuntu] ./ hidden folder??



themanfromdelmonte
October 30th, 2011, 12:13 PM
I saw a couple of files that started with ./ and tried to find it with nautilus but had no joy.
I found it in bash and it appears to be the home folder for something/someone?

Any ideas?

Elfy
October 30th, 2011, 12:22 PM
In nautilus do Ctrl+H

It will show hidden files - things with a . are hidden by default.

themanfromdelmonte
October 30th, 2011, 12:30 PM
./ is not just a hidden folder but a hidden root directory?

haqking
October 30th, 2011, 12:38 PM
./ is not just a hidden folder but a hidden root directory?

the . indicates the hidden attribute for both files and directories. and also The . refers to the working directory and the .. symbol refers to the working directory's parent directory so you can cd. to go up one or cd .. etc

There is only one / root directory from which all else branches from.

every absolute path, which is the address of a filesystem object relative to the root / directory, begins with a forward slash /

Forward slashes / are also used as separators for filesystem objects in both absolute paths and relative paths

m_duck
October 30th, 2011, 12:42 PM
./ tends to refer to the current folder. Or, at least that is what the . refers to. I.e. ./somefile.txt would be the file called somefile.txt in the directory you are currently in.

themanfromdelmonte
October 30th, 2011, 01:35 PM
Thanks. I see what I was doing now.

The Cog
October 30th, 2011, 02:58 PM
Good.

You can use the red Thread Tools pulldown menu at the top of the page to mark the thread as solved.

anewguy
October 30th, 2011, 03:37 PM
You might also see this in the syntax for running a shell script - usually shown as ./<somefilename>.

Dave ;)

haqking
October 30th, 2011, 03:44 PM
You might also see this in the syntax for running a shell script - usually shown as ./<somefilename>.

Dave ;)

yes but it means the same thing, you are saying the script .sh is in the current directory "." you only use ./ based on the scripts location

it is nothing to do with scripts or executables is what i mean ;-)

m_duck
October 30th, 2011, 03:50 PM
yes but it means the same thing, you are saying the script .sh is in the current directory "." you only use ./ based on the scripts location

it is nothing to do with scripts or executables is what i mean ;-)
Yeah, by default scripts and binaries are set not to run from the current directory if it is not in your PATH. The ./ syntax is a nice short way of referring to a script in the current directory, whilst effectively supplying its full path, allowing it to run.

anewguy
October 30th, 2011, 09:03 PM
Yep - I was just thinking that might be where the OP has seen it mentioned.

Dave ;)