Skip to Content
0

Question on file directory and file name

Jan 26, 2017 at 04:30 PM

31

avatar image

Hi,

Before posting this question, i searched in sdn, but could not find any answer.

What is the difference between giving File path as

1. ~/ ( i guess this is home or root directory)

2. ./ (there is dot infront of slash)

3. / (just slash)

what is the meaning of giving the file name as below, i don't understand why dots are specified, as i checked the actual file name coming in as with out dots, ex: Test_20170101_XYZ.csv

Test_.*._.*.csv

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Jan 26, 2017 at 08:47 PM
0

Hi Vijay!

~ in most cases is interpreted by Shell as home directory ($HOME variable).

. It's a link to directory itself. /usr/tmp/./texts equals to /usr/tmp/texts. Another example: ls dir and ls ./dir gives you the same result.

.. points to parent directory. So, path /usr/tmp/../texts equals to /usr/texts.

/ means absolute path. /usr/bin equals to ROOT/usr/bin where ROOT is the root directory of each Unix file system.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
Vijay B Jan 27, 2017 at 01:19 PM
0

Thank you very much for explaining with examples. Could you please let me know, purpose of dot used in file names:

what is the meaning of giving the file name as below, i don't understand why dots are specified, as i checked the actual file name coming in as with out dots, ex: Test_20170101_XYZ.csv

Test_.*._.*.csv

Thanks,

Share
10 |10000 characters needed characters left characters exceeded