# Useful Commands

## The which command

This command is used to find out which version of a program is being accessed by the node.  This is very useful if you have multiple versions of a program in your system like when you have just performed an upgrade.

Syntax:

```
which cardano-cli
```

This command will show the full path of the cardano-cli that is being used by the node.

## The find command

This command is useful when looking for where a particular file is located. &#x20;

Syntax:  Search for the file "filename' from the root directory '/' and return the full path if the file is located

```
find / -name 'filename' -print
```

Syntax:  Search from the current directory, all files ending in ".sh" and display the full path to these files

```
find . -name '*.sh' -print
```

## The netstat command

This command can show various network related outputs depending on the parameters that you pass to it.

Syntax:  To show configured network routes

```
netstat -rn
```

Syntax:  To display which IP address port 12788 is listening in

```
netstat -ln | grep 12788
```

## The htop command

This command will show you a dashboard of CPU, Memory and process utilization which is updated in realtime.

Syntax:

```
htop
```

NOTE:  A similar command "top" is also available with simpler output

## The umount command

This command is used to unmount filesystems.  You should use this command before removing a USB drive from the server.

Syntax:  Unmount the USB drive connected to the system

```
umount /media/cardano
```

NOTE:  Go to a different directory tree from the mount point or this command may fail.


---

# 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://blockchainlens.gitbook.io/cardano-spot-check/tips/useful-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.
