> For the complete documentation index, see [llms.txt](https://devops-collective-inc.gitbook.io/a-unix-person-s-guide-to-powershell/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devops-collective-inc.gitbook.io/a-unix-person-s-guide-to-powershell/commands-detail-c.md).

# Command 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:

```
cp

copy
```

## cp -R

To recursively copy:

```
copy -recurse
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devops-collective-inc.gitbook.io/a-unix-person-s-guide-to-powershell/commands-detail-c.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
