Πώς να λάβετε βοήθεια και να βρείτε τα ψευδώνυμα των εντολών στο Windows PowerShell?
Μια εντολή στο Powershell μπορεί να έχει ένα ή πολλά ψευδώνυμο. Ένα ψευδώνυμο είναι η εντολή αλλά σε μια μικρότερη και ως επί το πλείστον συντετμημένη μορφή. Μερικά ψευδώνυμα γίνονται για να ταιριάζει με τις εντολές bash.
Get-ChildItem
Αυτή η εντολή εμφανίζει το περιεχόμενο του τρέχοντος καταλόγου εργασίας.
Ψευδώνυμο: ls, dir
Get-Alias
Για να βρείτε το ψευδώνυμο μιας εντολής σε Powershell χρησιμοποιήσετε το Get-Alias εντολή.
Για παράδειγμα, βρείτε όλα τα ψευδώνυμα ξεκινήσει με r
get-alias r*
Ο Get-Alias η ίδια εντολή έχει ένα ψευδώνυμο gal. The following will do the same thing as above…
gal r*
Get-Alias παίρνει επίσης την πλήρη εντολή του ψευδωνύμου
gal ls
έξοδοι: ls -> Get-ChildItem
We can also find all the aliases of the specified command with the -Definition parameter. Για παράδειγμα, let’s find all the aliases of the Get-ChildItem εντολή. We use -d which is short for -Definition
gal -d get-childitem
έξοδοι
dir -> Get-ChildItem gci -> Get-ChildItem ls -> Get-ChildItem
Get-Command finds the commands by command name. Get-Command has the alias gcm. So we can do this…
Get cmdlets starting with get
gcm -c cmdlet get*
The above is the same as….
Get-Command -CommandType Cmdlet Get*
Για να λάβετε βοήθεια σχετικά με κάποιο από τα ψευδώνυμα ή εντολές, just type help in front of the command. Για παράδειγμα…
βοήθεια cp
