cancel
Showing results for 
Search instead for 
Did you mean: 

Question on file directory and file name

vijay_b4
Active Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

vijay_b4
Active Contributor
0 Kudos

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,

former_member190293
Active Contributor
0 Kudos

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.