From d6b5497b50ce4677a6c67b8705c2aac2bfff44c7 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sat, 16 Dec 2017 23:52:12 -0500 Subject: [PATCH] Update wc command and add tgz information to commands.md --- help/commands.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/help/commands.md b/help/commands.md index 66e2fd5..c5504c2 100644 --- a/help/commands.md +++ b/help/commands.md @@ -21,9 +21,10 @@ Note that "renaming" files is the same as moving them from one location to anoth - Only list png and jpg files: `ls *.{png,jpg}` - Print the file type based on header information: `file ` - Show all running processes as a tree: `pstree` -- Print the number of new lines: `wc -l ` -- Print the maximum line length: `wc -L ` -- Print the word count: `wc -w ` +- Print the number of lines in a file: `wc -l ` +- Print the length of the longest line in a file: `wc -L ` +- Print the number of words in a file: `wc -w ` +- Print the number of lines in all markdown files in a given directory, including subdirectories: `find . -name "*.md" | xargs wc -l` - Show the size of the current directory, including subdirectories: `du -h` - Show the size of the current directory and its files: `du -ha` - Get more information about any command: `man ` @@ -159,6 +160,7 @@ Note that a git repository must be cloned with SSH if you want to use SSH with i - View the contents of rar files: `unrar lb ` - Extract the contents of rar files: `unrar x ` - Extract the contents of zip files: `unzip ` +- Extract the contents of a tgz file: `tar -xvzf file.tgz` - Extract any type of archiving algorithm: `extract ` **Note**: When using `unrar` or `unzip` to extract multiple files (with wildcards), you must first escape the `*` to `\*`.