LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-20-2015, 02:34 AM   #1
skoda
Member
 
Registered: Jun 2013
Posts: 111

Rep: Reputation: Disabled
what does a dot character mean in linux?


Hi folks,
i was reading a tutorial about how to find files and folder sizes and came a cross this example

Quote:
root@host [5045 02:30:13 /home/johnc/public_html/wp-content]# du -h --max-depth=1
613M ./cache
4.0K ./reports
200K ./sedlex
24K ./wp-content
4.0K ./wppa-depot
40M ./backup-db
16K ./bps-backup
112K ./includes
57M ./plugins
8.0K ./ngg_styles
21M ./themes
362M ./gallery
4.0K ./banners
269M ./lg-gallery
4.1M ./ewww
4.0K ./upgrade
226M ./uploads
28K ./w3tc-config
1.7G .
You see at the bottom it indicates a 1.7G . (dot) . what does that dot mean?
 
Old 01-20-2015, 02:39 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,414
Blog Entries: 6

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
The dot means "this directory".

So in the output of du it means the total for this directory.

For sub directories it means the subdirectory below this directory, like ./uploads = the subdirectory uploads below this directory.
 
Old 01-20-2015, 02:50 AM   #3
skoda
Member
 
Registered: Jun 2013
Posts: 111

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
The dot means "this directory".

So in the output of du it means the total for this directory.

For sub directories it means the subdirectory below this directory, like ./uploads = the subdirectory uploads below this directory.
Pretty clear !!! Thanks astro
 
Old 01-20-2015, 09:39 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,516

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
Please mark as SOLVED once you have an answer or solution.
 
Old 01-20-2015, 10:14 AM   #5
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
In case you run into it in the future, while . means current directory, .. means previous directory.
This can be invoked multiple times,
Code:
../../test
means the file test up two directories.

If I am in my home directory
Code:
. == /home/Miati
.. == /home
../../ == /

To run executable scripts, they must be invoked with the current directory.
So if you have the script called foo, in the terminal typing foo would not work.
You would need to type ./foo

Code:
$ foo
foo: command not found
$ ./foo
Hello World!
Additionally, prefixing files with a dot, .config means a hidden file/folder.
So if you were trying to access a hidden folder in the same directory, something like this would be valid:
Code:
./.config/

Last edited by Miati; 01-20-2015 at 10:17 AM.
 
Old 01-20-2015, 10:24 AM   #6
average_user
Member
 
Registered: Dec 2010
Location: Warsaw, Poland
Distribution: Slackware
Posts: 192

Rep: Reputation: 63
To fully answer the question "what does a dot character mean in linux?" see this site. A dot can have multiple meanings.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
contact linux dot org zetrotrack000 Linux - Newbie 2 02-28-2012 10:02 AM
Loading Linux ....... ...... (missing dot) samac Slackware 15 07-15-2008 02:27 AM
dot space dot binary_0011 Linux - Newbie 5 09-14-2006 07:43 AM
useradd not accepting dot so i am not able to use dot in mail id hanu_raob Linux - General 5 05-13-2004 07:04 AM
Linux dot com interview macewan General 2 01-08-2004 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration