From a3ffe1f49afde3355dc2540e852fab77934bfb6d Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Mon, 10 Feb 2014 16:35:16 -0800 Subject: [PATCH] Added cksum, touch, uname, which and sw_vers. --- common/cksum.md | 8 ++++++++ common/touch.md | 16 ++++++++++++++++ common/uname.md | 15 +++++++++++++++ common/which.md | 12 ++++++++++++ osx/sw_vers.md | 12 ++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 common/cksum.md create mode 100644 common/touch.md create mode 100644 common/uname.md create mode 100644 common/which.md create mode 100644 osx/sw_vers.md diff --git a/common/cksum.md b/common/cksum.md new file mode 100644 index 0000000000..e3e3f81b8d --- /dev/null +++ b/common/cksum.md @@ -0,0 +1,8 @@ +# cksum + +> Calculates CRC checksums and byte counts of a file +> Note, on old UNIX systems the CRC implementation may differ. + +- Display a 32 checksum, size in bytes and filename + +`chksum {{filename}}` diff --git a/common/touch.md b/common/touch.md new file mode 100644 index 0000000000..beda030219 --- /dev/null +++ b/common/touch.md @@ -0,0 +1,16 @@ +# touch + +> Change a file access and modification times (atime, mtime) + +- Create a new empty file(s) or change the times for existing file(s) to current time.` + +`touch {{filename}}` + +- Set the times on a file to those specified + +`touch -t 201412250801.59 {{filename}} +`touch -t {{YYYYMMDDHHMM.SS}} {{filename}} + +- Set the times on a file to match those on second file + +`touch -r {{filename2}} {{filename}}` diff --git a/common/uname.md b/common/uname.md new file mode 100644 index 0000000000..bf89716a1c --- /dev/null +++ b/common/uname.md @@ -0,0 +1,15 @@ +# uname + +> Print operating system name + +- Print all available operating system and kernel information + +`uname -a` + +- Print the current operating system name (e.g. Linux, Darwin, SunOS, etc) + +`uname -s` + +- Print the nodename (hostname) of the system + +`uname -n` diff --git a/common/which.md b/common/which.md new file mode 100644 index 0000000000..6d5327d30b --- /dev/null +++ b/common/which.md @@ -0,0 +1,12 @@ +# which + +> Locate the a program in the user's path + +- Display the path of an executable program + +`which {{ls}}` +`which {{executable}}` + +- If there are multiple executables which match, display all + +`which -a {{executable}}` diff --git a/osx/sw_vers.md b/osx/sw_vers.md new file mode 100644 index 0000000000..977636a856 --- /dev/null +++ b/osx/sw_vers.md @@ -0,0 +1,12 @@ +# sw_vers + +> Print Mac OSX Software versioning information + +- Print OSX Version + +`sw_vers -productVersion` + +- Print OSX Build + +`sw_vers -buildVersion` +