• Complain

it-ebooks - A Unix Persons Guide to PowerShell

Here you can read online it-ebooks - A Unix Persons Guide to PowerShell full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2018, publisher: iBooker it-ebooks, genre: Humor. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

it-ebooks A Unix Persons Guide to PowerShell
  • Book:
    A Unix Persons Guide to PowerShell
  • Author:
  • Publisher:
    iBooker it-ebooks
  • Genre:
  • Year:
    2018
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

A Unix Persons Guide to PowerShell: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "A Unix Persons Guide to PowerShell" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

it-ebooks: author's other books


Who wrote A Unix Persons Guide to PowerShell? Find out the surname, the name of the author of the book and a list of all author's works by series.

A Unix Persons Guide to PowerShell — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "A Unix Persons Guide to PowerShell" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
About this Book
About

Principal author: Matt Penny


This e-book is intended as a 'Quick Start' guide to PowerShell for people who already know Bash or one of the other Unix shells.

The book has 3 elements:

  • an introductory chapter which covers some PowerShell concepts

  • a summary list of PowerShell equivalents of Unix commands in one e-book chapter

  • a detailed discussion of Powershell equivalents of Unix commands, organised in the alphabetical order of the unix command


This guide is released under the Creative Commons Attribution-NoDerivs 3.0 Unported License. The authors encourage you to redistribute this file as widely as possible, but ask that you do not modify the document.

Was this book helpful? The author(s) kindly ask(s) that you make a tax-deductible (in the US; check your laws if you live elsewhere) donation of any amount to The DevOps Collective to support their ongoing work.

Check for Updates! Our ebooks are often updated with new and corrected content. We make them available in three ways:

  • Our main, authoritative GitHub organization, with a repo for each book. Visit https://github.com/devops-collective-inc/
  • Our GitBook page, where you can browse books online, or download as PDF, EPUB, or MOBI. Using the online reader, you can link to specific chapters. Visit https://www.gitbook.com/@devopscollective
  • On LeanPub, where you can download as PDF, EPUB, or MOBI (login required), and "purchase" the books to make a donation to DevOps Collective. You can also choose to be notified of updates. Visit https://leanpub.com/u/devopscollective

GitBook and LeanPub have slightly different PDF formatting output, so you can choose the one you prefer. LeanPub can also notify you when we push updates. Our main GitHub repo is authoritative; repositories on other sites are usually just mirrors used for the publishing process. GitBook will usually contain our latest version, including not-yet-finished bits; LeanPub always contains the most recent "public release" of any book.

Table of Contents
Command Detail - A
commands detail - a
alias (list all the aliases)

The Powershell equivalent of typing alias at the bash prompt is:

get-alias
alias (set an alias)

At it's simplest, the powershell equivalent of the unix 'alias' when it's usedto set an alias is 'set-alias'

set-alias ss select-string

However, there's a slight wrinkle....

In unix, you can do this

alias bdump="cd /u01/app/oracle/admin/$ORACLE_SID/bdump/"

If you try doing this in Powershell, it doesn't work so well. If you do this:

set-alias cdtemp "cd c:\temp"cdtemp

...then you get this error:

cdtemp : The term 'cd c:\temp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1+ cdtemp+ ~~~~~~ + CategoryInfo : ObjectNotFound: (cd c:\temp:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

A way around this is to create a function instead:

remove-item -path alias:cdtempfunction cdtemp {cd c:\temp}

You can then create an alias for the function:

set-alias cdt cdtemp
apropos

apropos is one of my favourite bash commands, not so much for what it does...but because I like the word 'apropos'.

I'm not sure it exists on all flavours of *nix, but in bash apropos returns a list of all the man pages which have something to do with what you're searching for. If apropos isn't implemented on your system you can use man -k instead.

Anyway on bash, if you type:

apropos process

...then you get:

AF_LOCAL [unix] (7) - Sockets for local interprocess communicationAF_UNIX [unix] (7) - Sockets for local interprocess communicationApache2::Process (3pm) - Perl API for Apache process recordBSD::Resource (3pm) - BSD process resource limit and priority functionsCPU_CLR [sched_setaffinity] (2) - set and get a process's CPU affinity maskCPU_ISSET [sched_setaffinity] (2) - set and get a process's CPU affinity maskCPU_SET [sched_setaffinity] (2) - set and get a process's CPU affinity maskCPU_ZERO [sched_setaffinity] (2) - set and get a process's CPU affinity maskGConf2 (rpm) - A process-transparent configuration system

The Powershell equivalent of apropos or man -k is simply get-help

get-help processName Category Module Synopsis---- -------- ------ --------get-dbprocesses Function Get processes for a particul...show-dbprocesses Function Show processes for a particu...Debug-Process Cmdlet Microso... Debugs one or more processes...Get-Process Cmdlet Microso... Gets the processes that are ...

This is quite a nice feature of PowerShell compared to Bash. If get-help in Powershell shell scores a 'direct hit' (i.e. you type something like get-help debug-process) it will show you the help for that particular function. If you type something more vague, it will show you a list of all the help pages you might be interested in.

By contrast if you typed man process at the Bash prompt, you'd just get

No manual entry for process
Command Detail - B
commands detail - b
basename

A rough PowerShell equivalent for the unix basename is:

dir | select name

This depends on the file actually existing, whereas basename doesn't care.

A more precise (but perhaps less concise) alternative[1] is:

[System.IO.Path]::GetFileName('c:\temp\double_winners.txt')


Notes[1] I found [System.IO.Path]::GetFileName after reading Power Tips of the Day - Useful Path Manipulations Shortcuts, which has some other useful commands

Command Detail - C
commands detail - c
cal

There's no one-liner equivalent for the Linux cal, but there's a useful script, with much of the cal functionality here :

http://www.vistax64.com/powershell/17834-unix-cal-command.html

cd

The PowerShell equivalent of cd is:

Set-Location

...although there is a builtin PowerShell alias cd which points at set-location

cd ~

cd ~ moves you to your home folder in both unix and Powershell.

clear

The unix clear command clears your screen. The Powershell equivalent to the unix clear is

clear-host

PowerShell also has built-in alias clear for clear-host.

However, it's possibly worth noting that the behaviour of the two commands is slightly different between the two environments.

In my Linux environment, running putty, clear gives you a blank screen by effectively scrolling everything up, which means you can scroll it all back down.

The Powershell Clear-host on the other hand seems to wipe the previous output (actually in the same way that cmd's cls command does....). This could be quite a significant difference, depending on what you want to clear and why!

cp

The Posh version of cp is

copy-item

The following are built-in aliases for copy-item:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «A Unix Persons Guide to PowerShell»

Look at similar books to A Unix Persons Guide to PowerShell. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «A Unix Persons Guide to PowerShell»

Discussion, reviews of the book A Unix Persons Guide to PowerShell and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.