Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6938499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:30:05+00:00 2026-05-27T12:30:05+00:00

Special characters can be distinguished using backslash character \ . However, I want to

  • 0

Special characters can be distinguished using backslash character \ . However, I want to treat full period as a normal character to operate on hidden folders. For example:

ls -lh .

It will list the current directory. However, I want to list all the hidden folders. I want it to be usable with du -h, so I know the disk space the hidden folders consumed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:30:06+00:00Added an answer on May 27, 2026 at 12:30 pm

    Files and directories whose names start with . are “hidden” only in the sense that (a) ls ignores them by default and (b) wildcard expansion excludes them. In both cases, you can see dot files if you refer to them explicitly. * expands to all non-dot files; .* expands to all dot files.

    (Other tools and commands may also treat them as hidden; for example, GUI file managers like Nautilus typically don’t show dot files by default, but there’s often an option to show them.)

    ls -a overrides the special treatment of files whose names start with .. ls -A lists “hidden” files and folders, but excludes . (this directory) and .. (the parent directory); some versions of ls might not support -A.

    The du command, as far as I know, doesn’t treat dot files as hidden. du -h should show the entire directory tree starting at the current directory. (Try it in a small directory tree to make sure yours behaves this way.)

    EDIT :

    I’ve confirmed that at least the GNU coreutils version of du doesn’t treat files or directories whose names start with . specially; nothing is hidden.

    For example, this script:

    #!/bin/sh
    
    mkdir -p .dot/.dot .dot/nodot nodot/.dot nodot/nodot
    du -h
    

    produces this output on my system (the specific numbers depend on the nature of the file system, and are irrelevant to the current discussion):

    4.0K    ./.dot/.dot
    4.0K    ./.dot/nodot
    12K     ./.dot
    4.0K    ./nodot/.dot
    4.0K    ./nodot/nodot
    12K     ./nodot
    32K     .
    

    Does that meet your requirements? If not, can you explain more clearly just what you’re looking for? Do you want to list all directories, whether their names begin with . or not? Do you want to list only “hidden” directories? What output would you like for the directory structure created by the above script?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I scrape contents with special characters using the following code? Currently, the
HEllo, I want to know how can I display the special characters in UILabel
I want to know how I can include special characters in C Strings, i.e.:
I have certain strings which contain special characters so they can not be shared
How can I insert ASCII special characters (e.g. with the ASCII value 0x01) into
How can I restrict users from entering special characters in the text box. I
Can anyone tell me how to insert special characters into a MySQL database? I've
What is the regular exp for a text that can't contain any special characters
I need to pass '+' via the QueryString . some special character can be
How to validate special characters in a textbox without using Validate plugin on JQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.