Merge pull request #118 from terminalforlife/master
More Mostly-Presentational Tweakspull/120/head^2
commit
b68f46b84d
@ -1,31 +1,30 @@
|
||||
# chmod
|
||||
# Change the access permissions of a file or directory.
|
||||
# Change file mode bits
|
||||
|
||||
# Give the [u]ser who owns a file the right to e[x]ecute it:
|
||||
# Give the [u]ser who owns a file the right to e[x]ecute it.
|
||||
chmod u+x file
|
||||
|
||||
# Give the [u]ser rights to [r]ead and [w]rite to a file/directory:
|
||||
# Give the [u]ser rights to [r]ead and [w]rite to a file/directory.
|
||||
chmod u+rw file_or_directory
|
||||
|
||||
# Remove e[x]ecutable rights from the [g]roup:
|
||||
# Remove e[x]ecutable rights from the [g]roup.
|
||||
chmod g-x file
|
||||
|
||||
# Give [a]ll users rights to [r]ead and e[x]ecute:
|
||||
# Give [a]ll users rights to [r]ead and e[x]ecute.
|
||||
chmod a+rx file
|
||||
|
||||
# Give [o]thers (not in the file owner's group) the same rights as the [g]roup:
|
||||
# Give [o]thers (not in the file owner's group) the same rights as the [g]roup.
|
||||
chmod o=g file
|
||||
|
||||
# Remove all rights from [o]thers:
|
||||
# Remove all rights from [o]thers.
|
||||
chmod o= file
|
||||
|
||||
# Change permissions recursively giving [g]roup and [o]thers the abililty to [w]rite:
|
||||
# Change permissions recursively, allowing [g]roup and [o]thers to [w]rite.
|
||||
chmod -R g+w,o+w directory
|
||||
|
||||
# Set access rights using numeric (octal) form
|
||||
# Set access rights using numeric (octal) form.
|
||||
chmod 750 file
|
||||
|
||||
# Convert string representation of the access right
|
||||
# into numeric form and back
|
||||
# Convert string representation of the access right into numeric form and back.
|
||||
curl cheat.sh/chmod/750
|
||||
curl cheat.sh/chmod/rwxr-x---
|
||||
|
@ -1,47 +1,50 @@
|
||||
# Download a single file
|
||||
# curl
|
||||
# Command-line tool for transferring data with URL syntax
|
||||
|
||||
# Download a single file.
|
||||
curl http://path.to.the/file
|
||||
|
||||
# Download a file and specify a new filename
|
||||
# Download a file and specify a new filename.
|
||||
curl http://example.com/file.zip -o new_file.zip
|
||||
|
||||
# Download multiple files
|
||||
# Download multiple files.
|
||||
curl -O URLOfFirstFile -O URLOfSecondFile
|
||||
|
||||
# Download all sequentially numbered files (1-24)
|
||||
# Download all sequentially-numbered files (1-24).
|
||||
curl http://example.com/pic[1-24].jpg
|
||||
|
||||
# Download a file and follow redirects
|
||||
# Download a file and follow redirects.
|
||||
curl -L http://example.com/file
|
||||
|
||||
# Download a file and pass HTTP Authentication
|
||||
# Download a file and pass HTTP Authentication.
|
||||
curl -u username:password URL
|
||||
|
||||
# Download a file with a Proxy
|
||||
# Download a file with a Proxy.
|
||||
curl -x proxysever.server.com:PORT http://addressiwantto.access
|
||||
|
||||
# Download a file from FTP
|
||||
# Download a file from FTP.
|
||||
curl -u username:password -O ftp://example.com/pub/file.zip
|
||||
|
||||
# Get an FTP directory listing
|
||||
# Get an FTP directory listing.
|
||||
curl ftp://username:password@example.com
|
||||
|
||||
# Resume a previously failed download
|
||||
# Resume a previously failed download.
|
||||
curl -C - -o partial_file.zip http://example.com/file.zip
|
||||
|
||||
# Fetch only the HTTP headers from a response
|
||||
# Fetch only the HTTP headers from a response.
|
||||
curl -I http://example.com
|
||||
|
||||
# Fetch your external IP and network info as JSON
|
||||
# Fetch your external IP and network info as JSON.
|
||||
curl http://ifconfig.me/all/json
|
||||
|
||||
# Limit the rate of a download
|
||||
# Limit the rate of a download.
|
||||
curl --limit-rate 1000B -O http://path.to.the/file
|
||||
|
||||
# POST to a form
|
||||
# POST to a form.
|
||||
curl -F "name=user" -F "password=test" http://example.com
|
||||
|
||||
# POST JSON Data
|
||||
# POST JSON Data.
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"user":"bob","pass":"123"}' http://example.com
|
||||
|
||||
# POST data from the standard in / share data on sprunge.us
|
||||
# POST data from the standard in / share data on sprunge.us.
|
||||
curl -F 'sprunge=<-' sprunge.us
|
||||
|
@ -1,8 +1,11 @@
|
||||
# A list of all the available dictionaries can be queried by executing
|
||||
# dict
|
||||
# Dictionary client
|
||||
|
||||
# A list of all the available dictionaries can be queried by executing.
|
||||
dict -I
|
||||
|
||||
# translate "understand" to dutch
|
||||
# Translate 'understand' to Dutch.
|
||||
dict -d fd-eng-nld understand
|
||||
|
||||
# show available dict databases
|
||||
# Show available dict databases.
|
||||
dict -D
|
||||
|
@ -1,21 +1,20 @@
|
||||
# htop
|
||||
#
|
||||
# Display dynamic real-time information about running processes. An enhanced version of top.
|
||||
# Dynamic, real-time information about running processes
|
||||
|
||||
# Start htop:
|
||||
htop
|
||||
# Start htop.
|
||||
htop
|
||||
|
||||
# Start htop displaying only processes owned by given user:
|
||||
htop -u user_name
|
||||
# Start htop displaying only processes owned by given user.
|
||||
htop -u user_name
|
||||
|
||||
# Refresh every 10 seconds
|
||||
# Refresh every 10 seconds.
|
||||
htop -d 10
|
||||
|
||||
# Get help about interactive commands:
|
||||
?
|
||||
# While htop(1) is running, get help about interactive commands.
|
||||
?
|
||||
|
||||
# Inverts the sort order
|
||||
I
|
||||
# While htop(1) is running, invert the sort order.
|
||||
I
|
||||
|
||||
# Trace a process (with strace)
|
||||
s
|
||||
# While htop(1) is running, trace a process with strace.
|
||||
s
|
||||
|
@ -1,8 +1,8 @@
|
||||
# look
|
||||
# Look for lines in sorted file (Mac OS X)
|
||||
|
||||
# Look for lines which begins with the given prefix:
|
||||
# Look for lines beginning with the given prefix.
|
||||
look prefix file
|
||||
|
||||
# Look for lines ignoring case:
|
||||
# Look for lines, case-insensitively.
|
||||
look -f prefix file
|
||||
|
@ -1,26 +1,27 @@
|
||||
# Ruby is a dynamic, reflective, object-oriented, general-purpose programming language
|
||||
# ruby is a ruby interpreter
|
||||
# ruby
|
||||
# Interpreter of object-oriented scripting language Ruby
|
||||
|
||||
# invoke Ruby from the command line to run the script foo.rb
|
||||
# Invoke Ruby; a dynamic, reflective, object-oriented, general-purpose
|
||||
# programming language; from the command line to run the provided script.
|
||||
ruby foo.rb
|
||||
|
||||
# pass code as an argument
|
||||
# Execute Ruby code directly from the command-line.
|
||||
ruby -e 'puts "Hello world"'
|
||||
|
||||
# The -n switch acts as though the code you pass to Ruby was wrapped in the following:
|
||||
# while gets
|
||||
# # code here
|
||||
# end
|
||||
# The `-n` switch allows Ruby to execute code within a `while gets` loop.
|
||||
ruby -ne 'puts $_' file.txt
|
||||
|
||||
# Beware that with the -n switch $_ contains newline character in the end.
|
||||
# With the addition of -l switch each line read has the newline character removed.
|
||||
# Beware that with the `-n` switch, `$_` contains newline character at the end.
|
||||
# With the addition of the `-l` switch, each line read has the aforementioned
|
||||
# newline character removed.
|
||||
ls | ruby -lne 'File.rename($_, $_.upcase)'
|
||||
|
||||
# The -p switch acts similarly to -n, in that it loops over each of the lines in the input
|
||||
# after your code has finished, it always prints the value of $_
|
||||
# Example: replace e with a
|
||||
# The `-p` switch acts similarly to `-n`, in that it loops over each of the
|
||||
# lines in the input, after your code has finished; it always prints the value
|
||||
# of `$_`.
|
||||
#
|
||||
# The following example replaces `e` with `a`.
|
||||
echo "eats, shoots, and leaves" | ruby -pe '$_.gsub!("e", "a")'
|
||||
|
||||
# BEGIN block executed before the loop
|
||||
# BEGIN block executed before the loop.
|
||||
echo "foo\nbar\nbaz" | ruby -ne 'BEGIN { i = 1 }; puts "#{i} #{$_}"; i += 1'
|
||||
|
@ -1,13 +1,14 @@
|
||||
# GUI screenshot tool for taking, editing screenshots
|
||||
# scrot
|
||||
# Command-line screen capture utility
|
||||
|
||||
# Take screenshot of the current window
|
||||
# Take screenshot of the current window.
|
||||
scrot -u
|
||||
|
||||
# Take screenshot of the current window including border
|
||||
# Take screenshot of the current window, including border.
|
||||
scrot -ub
|
||||
|
||||
# Interactively select a window or rectangle with the mouse
|
||||
# Using a mouse, perform a rectangular selection of the screen to be captured.
|
||||
scrot -s
|
||||
|
||||
# Capture the screenshot after 5 seconds, display countdown time
|
||||
# Capture a screenshot after 5 seconds. A countdown is also displayed.
|
||||
scrot -u -d 5 -c
|
||||
|
Loading…
Reference in New Issue