what is ls -F (ls --classify) [closed] - bash

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Looking at the man pages for plain old ls I see there's a flag for -F
-F, --classify
append indicator (one of */=>#|) to entries
I've used it a few times, but all I see it adds a slash / to folders which is the same as ls -p
What does this mean for the others *=>#|?
I'm running Ubuntu 14.04 with GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

Each of the symbols is for a specific type of file. If you haven't seen them, it's probably because you don't have any files of that type. The man page for ls should say what each of them means. But, in case you can't read yours for some reason, here's what mine says:
-F Display a slash (`/') immediately after each pathname that is a
directory, an asterisk (`*') after each that is executable, an at
sign (`#') after each symbolic link, a percent sign (`%') after
each whiteout, an equal sign (`=') after each socket, and a
vertical bar (`|') after each that is a FIFO.
Mine seems to use some characters yours doesn't and not use some that yours does. So, to resolve the others you need to read the man page that refers to your version.

Related

Terminal: Hashcat charset - no matches found [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 days ago.
Improve this question
I'm trying to run hashcat to crack a zip file using the brute force method and I want to specify the character set using the below code in Mac M1 terminal: (where hcat.txt contains the hash of the zip file)
hashcat -a 3 -m 17225 --force hcat.txt ?l?l?l?l?l?l
But I got the below error.
zsh: no matches found: ?l?l?l?l?l?l
Simply enclose the pattern in single quotes, such as '?l?l?l?l?l'
This is because zsh is attempting to interpret '?' as a glob expansion parameter, which means any single character such as '.' in regex.

Why doesn't "ls -ad */" show both hidden and non-hidden directories? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
Why doesn't the command:
ls -ad /*
...show both hidden and non-hidden directories? And given this does not work, what would be the simplest command for showing hidden and non-hidden directories, without showing files?
Thanks!
/* is expanded by the shell before ls ever runs. The expansion only includes non-hidden files unless the dotglob option is set. Also, if you want the expansion limited to directories, use /*/ instead.

What does cd * do in bash? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I saw someone use cd * and then use other commands like ls et al after that.
What does it do? Can someone explain it?
The shell expands * to an alphabetical list of the current directory's contents.
cd ignores all arguments after the first.
In lucky and/or extremely controlled circumstances, you can rely on the first item in the wildcard expansion to be the directory you want to cd into.
This may be marginally useful and/or entertaining if you have just created and descended into the current directory and populated it with a single subdirectory. I find it hard to imagine it could have other actual uses.
This command:
cd *
will only work if first list from current path is a directory since it expands to very first entry (file or directory) in the current path. You can see what comes first by doing echo *.
I would suggest not really relying on it since alphabetically first expansion can give you a file also like .bashrc or some other file name starting with dot.

What's the meaning of every part of a bash prompt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
i'm very new to mac world, and i'm using bash doing some work.
But I'm not clear about the bash command line. It's so different from cmd.
yb_server:~ Aaron$
above is the command line when i start a terminal.
what's the meaning of yb_server?( I used to remember it's originally macintosh, why
it's changing to yb_server, how can i recover?)
what does ~ mean?
what does $ mean?
yb_server is your computer.
: is an arbitrary delimiter.
~ is your home directory (the current directory).
Aaron is you.
$ is "Speak to me, master!" But it is effectively an arbitrary delimiter.
The whole thing is your prompt. Google "bash prompt" for lots of info. Its format is totally up to you. Say echo $PS1 to find out what the format is now. The default is:
\h:\W \u\$
Learning what those symbols mean is left as an exercise for the reader!

Bash: tab completion selects by later part of file/directory name (like zsh)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Suppose I have these directories:
CSCI100
CSCI200
CSCI300
CSCI400
If I do
cd C<TAB>
it completes up to
cd CSCI
and then I must type a number to proceed.
Is there a way to do
cd 200<TAB>
which then alters the full command to
cd CSCI200
?
Bash's readline command "menu-complete" enables this behavior. You can either have this replace the Tab key's usual behavior (with the command bind "Tab: menu-complete", or by putting "Tab: menu-complete" in your .inputrc file), or choose a different keyboard shortcut for this function.
EDIT: Sorry, I misunderstood the question; it's about completing a suffix rather than a prefix of a filename. You can sort of do this with the default settings in bash if you use a wildcard and there's only one match for the pattern:
cd *200<TAB>
expands to:
cd CSCI200
If there's more than one match, it'll list matches if you TAB again. Binding TAB to menu-complete will make it cycle through matches instead. I don't know of any way to do this in bash without explicitly giving a wildcard to tell it where to do the expansion.

Resources