./
is part of the path to a directory/file.
If used as part of a parameter to a command
rm image.png
andrm ./image.png
are exactly the same and identify a file in the current directoryrm *./image.png
is a pattern which looks for files namedimage.png
in all subdirectories of the current directory which end with a dot
The key use for
./
usually is to call a script/executable in the current directory. When you execute a command without specifiying it's directory (e.g. cp
instead of /bin/cp
), the shell searches for this in all directories listed in the $PATH
variable. The current directory is usually not part of that variable (for security reasons) so you can use ./command-name
to tell the shell to look for the command in the current directory.
https://apple.stackexchange.com/questions/95582/meaning-of-in-mac-terminal/95584
"|" it's called
pipe
. It gives the output of the first command as the input to the second command.
In your case it means:
The result of
The result of
sudo ps -ef
is fed as the input of grep processname
sudo ps -ef
:This lists all the processes running. Type
man ps
in the termial for more.grep processname
So, this list of processes is fed into grep which just searches for the program defined by
programname
.Example
Typing
sudo ps -ef | grep firefox
in my terminal returns:TL;DR
*
for executables/
for directories@
for symbolic links|
for FIFOs=
for sockets>
for doors- (nothing) for regular files
No comments:
Post a Comment