Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Is there a command equivalent to ls -a in bash?

Mar
30
0
Is there a dir switch combination which shows all files and directories, like ls -a in bash?

dir /a:h /a:d will show both hidden and non-hidden directories at the same time, but I cannot find a way to make it show files as well.

I found pdir, but I am not getting very far with it.
 
From: jason404
| Is there a
| Code:
| dirswitch combination which shows all files and directories, like
| Code:
| ls -ain bash?
|
|
| Code:
| dir /a:h /a:dwill show both hidden and non-hidden directories at the
| same time, but I cannot find a way to make it show files as well.

1/ Only the last occurrence of the /a: option in the command is effective. All attribute selection options must be combined in that one occurrence. Your example worked as reported because the /A:D option (without additional suboptions) selects ALL directories, including hidden ones.

2/ Option /A: selects all directories and all files unconditionally. As the HELP reports, the choices made after the /A: restrict selection to whatever is explicitly specified. Please read HELP topic "Attribute Switches".
--
HTH, Steve
 
How about just dir /a with no extra parameters? Does that do what you want?

On Sat, Jun 11, 2011 at 08:40, jason404 <> wrote:


> Is there a
> Code:
> ---------
> dir
> ---------
> switch combination which shows all files and directories, like
> Code:
> ---------
> ls -a
> ---------
> in bash?
>
>
> Code:
> ---------
> dir /a:h /a:d
> ---------
> will show both hidden and non-hidden directories at the same time, but I
> cannot find a way to make it show files as well.
>
>
>
>
>



--
Jim Cook
2011 Monday: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Tuesday.
 
Back
Top
[FOX] Ultimate Translator
Translate