Jump to content

Cheat.sh -- command examples


Recommended Posts


I ran across this neat website that returns you a quick explanation of a command and some examples:

Cerberus :: ~ » curl -s cheat.sh/cp

# cp
# Copy files and directories.

# Copy a file to another location:
cp path/to/file.ext path/to/copy.ext

# Copy a file into another directory, keeping the filename:
cp path/to/file.ext path/to/target_parent_directory

# Recursively copy a directory's contents to another location (if the destination exists, the directory is copied inside it):
cp -r path/to/directory path/to/copy

# Copy a directory recursively, in verbose mode (shows files as they are copied):
cp -vr path/to/directory path/to/copy

# Copy text files to another location, in interactive mode (prompts user before overwriting):
cp -i *.txt path/to/target_directory

Cerberus :: ~ » curl -s cheat.sh/ls
# ls
# List directory contents.

# List files one per line:
ls -1

# List all files, including hidden files:
ls -a

# Long format list (permissions, ownership, size and modification date) of all files:
ls -la

# Long format list with size displayed using human readable units (KB, MB, GB):
ls -lh

# Long format list sorted by size (descending):
ls -lS

# Long format list of all files, sorted by modification date (oldest first):
ls -ltr

Enjoy B)

  • Like 3
  • Thanks 1
Link to comment
Share on other sites




A man page, acronym of manual page, is a software documentation found in all Unix-like operating systems. Some man pages are short; some are comprehensive. A man page is divided into several parts, organized  with headings for each section, such as NAME, SYNOPSIS, CONFIGURATION, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and SEE ALSO.

Sometimes, I find it really time-consuming when I wanted to learn a practical example of a given Unix command using man pages. So, I started to look for some good alternatives to man pages which are focused on mostly examples, skipping all other comprehensive text parts. Thankfully, there are some really good alternatives out there. In this tutorial, we will be discussing 5 alternatives to man pages for Unix-like operating systems.





These are not quite the same as cheat sheets but are very useful along similar lines. 😎

  • Like 2
Link to comment
Share on other sites

On 11/27/2019 at 10:48 AM, securitybreach said:

Cool but all of those require you to install then. Whereas this one is just querying a website to give results.


All paths lead to Rome my friend. 😆

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...