Jump to content
securitybreach

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

Share this post


Link to post
Share on other sites

 

Quote

 

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.

 

 

https://www.ostechnix.com/3-good-alternatives-man-pages-every-linux-user-know/

 

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

  • Like 2

Share this post


Link to post
Share on other sites

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

  • Like 2

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...