# Linux commands

### Port status

```
ss -antup
```

### Active network service

```
lsof -i -P -n

sudo netstat -tulpn
```

### Find files / folder

```
find / -name "*.php" 2>/dev/null

find / -type d -name "www" 2>/dev/null
```

### Copy and Rename

```
cp /tmp/a /tmp2/a

mv index.html rev.php
```

### Make empty file&#x20;

```
touch newfile.html
```


---

# Agent Instructions: 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:

```
GET https://osnotes.jackielam.net/oscp/general/common-operations-tty-ssh-rbash/linux-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
