Featured

Use latexdiff to compare different versions of LaTeX tex files to visually mark differences

This post introduces how to use latexdiff to compare two versions of latex *.tex files, in order to visually mark changes to tex files.

(One colleague asked me about the usage of latexdiff, so I think it is a good time to write it up into a blog post to share with those who need some help with this.)

latexdiff is a Perl script and requires an installation of Perl 5.8 or higher.

Use latexdiff to mark differences and create a new LaTeX document with markup differences between two latex files.

  • Linux (Ubuntu) users

latexdiff can be found in Ubuntu repository and detailed description of usage can be found here.

In your terminal, issue the commands below to install latexdiff.

sudo apt-get update
sudo apt-get install latexdiff
# open your terminal, and cd to the tex files you need to compare
# issue the following command
latexdiff original_version.tex revised_version.tex > diff.tex

Run the diff.tex file like you run a normal tex file, you will see beautifully marked differences in the pdf file.

  • Mac OS X users

latexdiff is a Perl script and requires an installation of Perl 5.8 or higher.
Mac OS X includes an installation of Perl and no additional setup is required. latexdiff can be found in any CTAN repository
(If you are using MacTex on your mac,  latexdiff is already installed in MacTex under /usr/texbin/latexdiff. No need to install it separately. To use latexdiff in commend line, see below)
After you setting perl and latexdiff, just open your terminal, and cd to the path where you put you two versions of latex tex files, and then issue the command. (If the two tex files are located in different location, you can just give the relative path to that location for each version of tex file.)

 

$ latexdiff original_version.tex revised_version.tex > diff.tex
will compare original_version.tex to revised_version.tex and create a new file diff.tex showing the differences.
Run the diff.tex file like you run a normal tex file, you will see beautifully marked differences in the pdf file.
  • Online latexdiff 

when you get the diff.tex on the online latexdiff, you can paste into a new tex file and then you can run it and you will see the pdf which shows the differences.
  • Multiple tex files for each version

If each version of your text files contains multiple (sub) tex files or if you want to use latexdiff with Git, check the Reference lists for potential solutions.

References

LATEXDIFF: SUPERB DIFF TOOL FOR LATEX (pdf) — talks about solutions to multiple files, but this can only deal with sub-files on the same level, not nested cases.

Two LaTeX gems: ShareLaTeX and latexdiff (pdf)

Using Latexdiff For Marking Changes To Tex Documents (pdf)

Multiple-file LaTeX diff (pdf— this one is very good. – use python code to merge multiple tex files to one big tex file for each version and then use latexdiff to make comparision.

Latexdiff with subfiles (pdf) — this one talks about solutions to multiple tex files.

Using latexdiff with git (pdf) – Git Latexdiff  — this is about using git together with latexdiff

Git and latexdiff: compare versions of LaTeX documents (pdf) — this is also about using git together with latexdiff

 

 

 

Some commonly used tips for Mac

This post provides some frequently used tips for Mac.

  • Insert and play a video file from your computer (mac)

From HERE.

  • Open unidentified

Open Program from Unidentified Developer (Mac)

  1. In the Finder, locate the app you want to open. (Don’t use Launchpad to do this. Launchpad doesn’t allow you to access the shortcut menu.)
  2. Press the Control key, then click the app icon.
  3. Choose Open from the shortcut menu.
  4. Click Open.
  • Open a group of pics in preview to scroll (use arrow keys) to view

  • Save word doc 2 PDF (make link clickable)

From HERE

 

 

 

 

How to write a superscript in Google slides

To make a superscript text in Google Slides for PC,

First, select the text you want to superscript;

Then,  hold CTRL and press the period (.)  key.

Subscript Ctrl + ,
Superscript Ctrl + .

To make a Superscript and  Subscript text in Google Slides for Mac,

Subscript ⌘ + ,
Superscript ⌘ + .

Slight movement of object

First, select the object to make slight movement.

Then, use SHIFT + arrow key (i.e., Up, Down, Left, or Right)

 

References

Keyboard shortcuts for Google Slides

Common actions
New slide Ctrl + m
Duplicate slide Ctrl + d
Undo Ctrl + z
Redo Ctrl + y
Ctrl + Shift + z
Copy Ctrl + c
Cut Ctrl + x
Paste Ctrl + v
Copy formatting of the selected text or shape Ctrl + Alt + c
Paste formatting of the selected text or shape Ctrl + Alt + v
Insert or edit link Ctrl + k
Open link Alt + Enter
Delete Delete
Select all Ctrl + a
Select none Ctrl + Shift + a
Find Ctrl + f
Find and replace Ctrl + h
Find again Ctrl + g
Find previous Ctrl + Shift + g
Open… Ctrl + o
Print Ctrl + p
Save
Every change is automatically saved in Drive
Ctrl + s
Show common keyboard shortcuts Ctrl + /
Search the menus Alt + /
Alt + z (Google Chrome)
Hide or show menus (compact mode) Ctrl + Shift + f
Turn on captions while presenting Ctrl + Shift + c
Alt text Ctrl + Alt + y
Film strip actions
Move to previous slide Page Up
Up arrow
Move to next slide Page Down
Down arrow
Move focus to first slide Home
Move focus to last slide End
Move slide up Ctrl + Up arrow
Move slide down Ctrl + Down arrow
Move slide to beginning Ctrl + Shift + Up arrow
Move slide to end Ctrl + Shift + Down arrow
Select previous slide Shift + Up arrow
Select next slide Shift + Down arrow
Select first slide Shift + Home
Select last slide Shift + End
Navigation
Zoom in Ctrl + Alt and +
Zoom out Ctrl + Alt and 
Move to filmstrip Ctrl + Alt + Shift + f
Move to canvas Ctrl + Alt + Shift + c
Open speaker notes panel Ctrl + Alt + Shift + s
Change to HTML view of presentation Ctrl + Alt + Shift + p
Open animations panel Ctrl + Alt + Shift + b
Continue in animation preview Enter
Open Explore Ctrl + Alt + Shift + i
Go to side panel Ctrl + Alt + .
Ctrl + Alt + ,
Open dictionary Ctrl + Shift + y
Open revision history panel Ctrl + Alt + Shift + h
Open cell border selection (for tables) holding Ctrl + Alt, press e then p
Play the selected video Enter
Present slides Ctrl + F5
Exit the current mode Esc
Menus
Context menu Ctrl + Shift + \
Ctrl + Shift + x
File menu in Google Chrome: Alt + f
other browsers: Alt + Shift + f
Edit menu in Google Chrome: Alt + e
other browsers: Alt + Shift + e
View menu in Google Chrome: Alt + v
other browsers: Alt + Shift + v
Insert menu in Google Chrome: Alt + i
other browsers: Alt + Shift + i
Format menu in Google Chrome: Alt + o
other browsers: Alt + Shift + o
Tools menu in Google Chrome: Alt + t
other browsers: Alt + Shift + t
Help menu in Google Chrome: Alt + h
other browsers: Alt + Shift + h
Accessibility menu
(present when screen reader support is enabled)
in Google Chrome: Alt + a
other browsers: Alt + Shift + a
Input tools menu
(available in presentations in non-Latin languages)
Ctrl + Alt + Shift + k
Toggle input controls
(available in presentations in non-Latin languages)
Ctrl + Shift + k
Comments
Insert comment Ctrl + Alt + m
Enter current comment holding Ctrl + Enter
Move to next comment in the presentation holding Ctrl + Alt, press n then c
Move to previous comment in the presentation holding Ctrl + Alt, press p then c
When focus is on comment, move to next comment j
When focus is on comment, move to previous comment k
When focus is on comment, reply to comment r
When focus is on comment, resolve comment e
Open comment discussion thread Ctrl + Alt + Shift + a
Text
Bold Ctrl + b
Italic Ctrl + i
Underline Ctrl + u
Subscript Ctrl + ,
Superscript Ctrl + .
Strikethrough Alt + Shift + 5
Clear formatting Ctrl + \
Ctrl + Space
Increase font size Ctrl + Shift + >
Decrease font size Ctrl + Shift + <
Left align Ctrl + Shift + l
Right align Ctrl + Shift + r
Center align Ctrl + Shift + e
Justify Ctrl + Shift + j
Move paragraph down Alt + Shift + Down arrow
Move paragraph up Alt + Shift + Up arrow
Increase indent Ctrl + ]
Decrease indent Ctrl + [
Bulleted list Ctrl + Shift + 8
Numbered list Ctrl + Shift + 7
Select list item holding Ctrl + Alt + Shift, press e then i
Select list items at current level holding Ctrl + Alt + Shift, press e then o
Move to next text formatting change holding Ctrl + Alt, press n then w
Move to previous text formatting change holding Ctrl + Alt, press p then w
Move to next misspelling Ctrl + ‘
Move to previous misspelling Ctrl + ;
Move and arrange objects
Duplicate Ctrl + d
Group Ctrl + Alt + g
Ungroup Ctrl + Alt + Shift + g
Send backward Ctrl + Down arrow
Bring forward Ctrl + Up arrow
Send to back Ctrl + Shift + Down arrow
Bring to front Ctrl + Shift + Up arrow
Select next shape Tab
Select previous shape Shift + Tab
Nudge up, down, left, or right Arrow keys
Nudge one pixel at a time Shift + Arrow keys
Rotate counterclockwise by 1° Alt + Shift + Left arrow
Rotate clockwise by 1° Alt + Shift + Right arrow
Rotate counterclockwise by 15° Alt + Left arrow
Rotate clockwise by 15° Alt + Right arrow
Resize larger horizontally Ctrl + Alt + b
Resize larger vertically Ctrl + Alt + i
Resize smaller Ctrl + Alt + j
Resize larger Ctrl + Alt + k
Resize smaller vertically Ctrl + Alt + q
Resize smaller horizontally Ctrl + Alt + w
Exit crop mode Enter
Suppress guides Alt + Move with mouse
Duplicate Ctrl + Move with mouse
Resize from center Ctrl + Resize with mouse
Constrain to vertical or horizontal movements Shift + Move with mouse
Constrain to object’s aspect ratio Shift + Resize with mouse
Constrain to 15° rotation increments Shift + Rotate with mouse
Screen reader support
Speak selection Ctrl + Alt + x
Enable screen reader support
Learn more about using Google Slides with a screen reader
Ctrl + Alt + z
Alt + Shift + ~
Speak from cursor location Ctrl + Alt + r
Announce formatting at cursor location holding Ctrl + Alt, press a then f

 

Mac shortcuts

Common actions
New slide Ctrl + m
Duplicate slide ⌘ + d
Undo ⌘ + z
Redo ⌘ + y
⌘ + Shift + z
Copy ⌘ + c
Cut ⌘ + x
Paste ⌘ + v
Copy formatting of the selected text or shape ⌘ + Option + c
Paste formatting of the selected text or shape ⌘ + Option + v
Insert or edit link ⌘ + k
Open link Option + Enter
Delete Delete
Select all ⌘ + a
Select none ⌘ + Shift + a
Find ⌘ + f
Find and replace ⌘ + Shift + h
Find again ⌘ + g
Find previous ⌘ + Shift + g
Open… ⌘ + o
Print ⌘ + p
Save
Every change is automatically saved in Drive
⌘ + s
Show common keyboard shortcuts ⌘ + /
Search the menus Option + /
Ctrl + Option + z
Mozilla Firefox: Ctrl + ~
Hide or show menus (compact mode) Ctrl + Shift + f
Turn on captions while presenting ⌘ + Shift + c
Alt text ⌘ + Option + y
Film strip actions
Move to previous slide Up arrow
Move to next slide Down arrow
Move focus to first slide Fn + Left arrow
Move focus to last slide Fn + Right arrow
Move slide up ⌘ + Up arrow
Move slide down ⌘ + Down arrow
Move slide to beginning ⌘ + Shift + Up arrow
Move slide to end ⌘ + Shift + Down arrow
Select previous slide Shift + Up arrow
Select next slide Shift + Down arrow
Select first slide Shift + Fn + Left arrow
Select last slide Shift + Fn + Right arrow
Navigation
Zoom in ⌘ + Option and +
Zoom out ⌘ + Option and
Move to filmstrip ⌘ + Option + Shift + f
Move to canvas ⌘ + Option + Shift + c
Open speaker notes panel ⌘ + Option + Shift + s
Change to HTML view of presentation ⌘ + Option + Shift + p
Open animations panel ⌘ + Option + Shift + b
Continue in animation preview Enter
Open explore tool ⌘ + Option + Shift + i
Define selected word in explore tool ⌘ + Shift + y
Go to side panel ⌘ + Option + .
⌘ + Option + ,
Open revision history panel ⌘ + Option + Shift + h
Open cell border selection (for tables) holding Ctrl + ⌘, press e then p
Play the selected video Enter
Present slides ⌘ + Enter
Present slides from beginning ⌘ + Shift + Enter
Exit the current mode Esc
Menus
Context menu ⌘ + Shift + \
File menu Ctrl + Option + f
Edit menu Ctrl + Option + e
View menu Ctrl + Option + v
Insert menu Ctrl + Option + i
Slide menu Ctrl + Option + s
Format menu Ctrl + Option + o
Arrange menu Ctrl + Option + r
Tools menu Ctrl + Option + t
Help menu Ctrl + Option + h
Input tools menu
(available in presentations in non-Latin languages)
⌘ + Option + Shift + k
Toggle input controls
(available in presentations in non-Latin languages)
⌘ + Shift + k
Comments
Insert comment ⌘ + Option + m
Enter current comment holding Ctrl + Enter
Move to next comment in the presentation holding Ctrl + ⌘, press n then c
Move to previous comment in the presentation holding Ctrl + ⌘, press p then c
When focus is on comment, move to next comment j
When focus is on comment, move to previous comment k
When focus is on comment, reply to comment r
When focus is on comment, resolve comment e
Open comment discussion thread ⌘ + Option + Shift + a
Text
Bold ⌘ + b
Italic ⌘ + i
Underline ⌘ + u
Subscript ⌘ + ,
Superscript ⌘ + .
Strikethrough ⌘ + Shift + x
Clear formatting ⌘ + \ (back slash)
Increase font size ⌘ + Shift + >
Decrease font size ⌘ + Shift + <
Left align ⌘ + Shift + l
Right align ⌘ + Shift + r
Center align ⌘ + Shift + e
Justify ⌘ + Shift + j
Select paragraph above Option + Shift + Up arrow
Select paragraph below Option + Shift + Down arrow
Increase indent ⌘ + ]
Decrease indent ⌘ + [
Bulleted list ⌘ + Shift + 8
Numbered list ⌘ + Shift + 7
Select list item holding Ctrl + ⌘ + Shift, press e then i
Select list items at current level holding Ctrl + ⌘ + Shift, press e then o
Move to next text formatting change holding Ctrl + ⌘, press n then w
Move to previous text formatting change holding Ctrl + ⌘, press p then w
Move to next misspelling ⌘ + ‘
Move to previous misspelling ⌘ + ;
Move and arrange objects
Duplicate ⌘ + d
Group ⌘ + Option + g
Ungroup ⌘ + Option + Shift + g
Send backward ⌘ + Down arrow
Bring forward ⌘ + Up arrow
Send to back ⌘ + Shift + Down arrow
Bring to front ⌘ + Shift + Up arrow
Select next shape Tab
Select previous shape Shift + Tab
Nudge up, down, left, or right Arrow keys
Nudge one pixel at a time Shift + Arrow keys
Rotate counterclockwise by 1° Option + Shift + Left arrow
Rotate clockwise by 1° Option + Shift + Right arrow
Rotate counterclockwise by 15° Option + Left arrow
Rotate clockwise by 15° Option + Right arrow
Resize larger horizontally ⌘ + Ctrl + b
Resize larger vertically ⌘ + Ctrl + i
Resize smaller ⌘ + Ctrl + j
Resize larger ⌘ + Ctrl + k
Resize smaller horizontally ⌘ + Ctrl + w
Exit crop mode Enter
Suppress guides ⌘ + Move with mouse
Duplicate Option + Move with mouse
Resize from center Option + Resize with mouse
Constrain to vertical or horizontal movements Shift + Move with mouse
Constrain to object’s aspect ratio Shift + Resize with mouse
Constrain to 15° rotation increments Shift + Rotate with mouse
Screen reader support
Speak selection Ctrl + ⌘ + x
Enable screen reader support
Learn more about using Google Slides with a screen reader
Option + ⌘ + z
Speak from cursor location Ctrl + ⌘ + r
Announce formatting at cursor location holding Ctrl + ⌘, press a then f

Install GIMP on Ubuntu

This post introduces how to install GIMP on Ubuntu.

GIMP (GNU Image Manipulation Program) is a freely distributed software for manipulating images. We can easily optimize the image, convert their type using GIMP. It provides the power and flexibility to designers to transform images into truly unique creations. GIMP is the cross platforms application and available for Linux, Windows, MAC OS, and FreeBSD etc.

For Ubuntu, you can get it for free using your Software Center. Open the Software Center, search for “gimp”, and then install the “GIMP Image Editor”. But below we provide how to install and uninstall GIMP from command line.

Install GIMP

For Ubuntu, you can use the following command to install GIMP on Ubuntu

You are required to add an external apt repository in your system to install Gimp on Ubuntu system. After adding the repository, install Gimp using the following set of commands. It will install or upgrade the latest packages of Gimp on your Ubuntu Linux system.

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp

Launch GIMP Application

You can search Gimp using GNOME search box and launch it.

Alternatively, (on Ubuntu and RedHat) you can also launch gimp application using the command line as follows:

$ gimp &

Uninstall GIMP

If you no longer need of Gimp and want to remove from your system, Use the following command to remove all Gimp application and associated data from your system.

$ sudo apt-get autoremove gimp gimp-plugin-registry

Revert to GIMP stable release

Since GIMP 2.9 is unstable development release, there might be bugs and stability issues. You can easily revert to the stable GIMP 2.8.16, the stock version in Ubuntu 16.04 by running the commands below in terminal:

sudo apt install ppa-purge 
sudo ppa-purge ppa:otto-kesselgulasch/gimp-edge

 

References:

How to Install GIMP 2.10 on Ubuntu 18.04 LTS

HomeNewsThemesHowto TipsHow to Install The Latest GIMP 2.9.5 in Ubuntu 16.04

 

Screenshot shortcuts on Mac

The Mac OS has always made it easy to capture a screen shot. (A screen shot is an image of your computer desktop or an active window.)

This post  provides a summary of all the keyboard shortcuts you can use to capture your screen on Mac. (Check HERE for screenshot shortcuts on Linux.)

 Command + Shift + 3

The screen shot will be automatically saved as a PNG file on your Desktop with the filename starting with “Picture” followed by a number (e.g., Picture 1, Picture 2, …)

 

Command + Control + Shift + 3

The screen shot will be copied to your clipboard, so you can paste it into another program suchas PowerPoint, Word, GIMP.

 

  • Customized area of screen

Command + Shift + 4

A cross-hair cursor will appear and you can click and drag to select the area you wish to capture. When you release the mouse button, the screen shot will be automatically saved as a PNG file on your Desktop following the same naming convention as explained on the first tip above.

 

 Command + CTRL + Shift + 4

A cross-hair cursor will appear and you can click and drag to select the area you wish to capture. When you release the mouse button, you can paste the screen shot to another application.

 

  • Active window

Press and hold

Command + Shift + 4 

then tap on the Spacebar.

The cursor will change to a camera, and you can move it around the screen. As you move the cursor over an application window, the window will be highlighted. The entire window does not need to be visible for you to capture it. When you have the cursor over a window you want to capture, just click the mouse button and the screen shot will be saved as a PNG file on your Desktop.

 

Press and hold

Command + CTRL + Shift + 4

then tap on the Spacebar.

The cursor will change to a camera, which you can move around the screen. As you move the cursor over an application window, the window will be highlighted. The entire window does not need to be visible for you to capture it. When you have the cursor over a window you want to capture, just click the mouse button and you can paste the screen shot into another application.

 

  • Screenshot with tooltip

 Command + SHIFT + 4

The trick is simple, you have to keep press (+SHIFT) first. Then hover mouse to make tool tip appear and press (4).

         Simple way to do this : a small trick

 1. open you screen , for which you want to take screen shot 
 2. point to tool-tip , it will show that tooltip .
 3  then capture whole screen by Command + Shift + 3 
 4. preview above captured image , and expand to full screen 
 5. now use Command + Shift + 4 to capture tool-tip

 

 

 

  • References and Further reading list

 

 

 

 

 

Monitor CPU temperature from terminal on Ubuntu

This post provides instructions on how to monitor CPU emperatures from command line on Ubuntu.

Step 1: Install lm-sensors using the following command in your terminal

$ sudo apt-get install lm-sensors

Step 2: type the following command in terminal

$ sudo sensors-detect

 You will be asked a few questions. Answer Yes for all of them.

Step 3:  type sensors in your terminal to get your CPU temperature.

$ sensors

Step 4: You can run the following command to see temperature values updating each second

$ watch sensors
$ watch -n 10 sensors  

# this will update the temperature values every 10 seconds. You got the idea -- you can change the number 10 to any seconds you would like to see the updated temperature values.

Step 5: use Ctrl + C to terminate.

 

For more commonly used Linux commands, check my other posts at here  and here .

 

lftp usage on Linux

This post introduces lftp usage on Linux.

(Thanks Scott for sharing this nice tool.)

lftp is a command-line program client for several file transfer protocols. lftp is designed for Unix and Unix-like operating systems.

1: Installation on Ubuntu:

$ sudo apt-get update
$ sudo apt-get install lftp

2: Some commonly used commands with lftp:

ls  — list direcotries and files on remote ftp server

cd — change directory on remote ftp server

lpwd — list local machine current directory

lcd — change local directory

mput *.csv  — mput for multiple files, put for a single specific file.

This will take from the current local directory  and put into the current remote directory on  remote ftp server.

copy directory and its contents to and from ftp server (from and to local machine):

mirror -c -R  path/to/localdirectory/   

This will copy local directory to (the current directory) on the  remove ftp server  , c means continue)

       mirror -c  path/to/remote/directory

This will copy the remote directory  to (the current local directory  , c means continue)

(for more commands, check the lftp man page provided in the references below.)

3: Using Box under Linux (using lftp)

The lftp command is a powerful file transfer client that can be used with Box.

Box supports the secure FTPS protocol and you can use this with lftp for secure file transfer and mirroring.

The lftp command is smart enough to auto-negotiate to use FTPS but this example forces the issue to make absolutely sure unencrypted FTP is never attempted.

Here is an example of how to connect using FTPS.

$ lftp
lftp :~> set ftps:initial-prot ""
lftp :~> set ftp:ssl-force true
lftp :~> set ftp:ssl-protect-data true
lftp :~> open ftps://ftp.box.com:990
lftp ftp.box.com:~> user yourusername@psu.edu
Password:
lftp yourusername@psu.edu@ftp.box.com:~> ls
...

 

when finish use exit to exit from lftp.

4: Copy a remote folder via FTP on the Linux command line using lftp (PDF)

 

References:

lftp Man page (PDF)

Using Box under Linux (PDF)

For more commonly used Linux commands, check my other posts at here  and here .

 

Find all files containing specific text on Linux and Mac

This post introduces how to find all files containing some text on Linux and Mac.

Step 1: cd to the folder where you would like to start with the search.

Step 2: use the following command:

$ grep -Ril "text-to-find-here" ./

Then the file names containing the text you would like to search will be listed.

  • R — stands for recursive.
  • i —  ignore case (optional in your case).
  • l — stands for “show the file name, not the result itself”.

For more commonly used Linux commands, check my other posts at here  and here .

Find files NOT ending in specific extensions

This post provides instructions on how to find files NOT ending in specific file extension(s) when a folder contains many many files on Linux (tested on Ubuntu and CentOS)  and Mac OS.

Open a terminal, and

cd into the folder you would like to list the file extensions.

In your terminal, issue the following command :

$ find . ! \( -name "*.py" -o -name "*.exe" \)

This will list all files that are not a .py file and not a .exe file (change the file extension(s) name according to your name:)).

 

$ find . ! \( -name "*.exe" \)

This will list all files that are not a .exe file.

 

$ find . ! \( -iname "*.exe" \)

This will list all files that are not a .exe or .EXE file.

Note:  -name is case sensitive while -iname is case insensitive.

 

For more commonly used Linux commands, check my other posts at here  and here .

Find the distinct file extensions in a folder

This post provides instructions on how to list all the distinct file extensions when a folder contains many many files on Linux (tested on Ubuntu and CentOS)  and Mac OS.

Open a terminal, and

cd into the folder you would like to list the file extensions

Method 1: issue the following command:

$ find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u

This will help us:

  • Find all files from current folder (including files contained in its sub-folders)
  • Prints extension of files if any
  • Make a unique sorted list (e.g., sort -u is for ordering by Alphabet, -u means unique)

See the  pic below for an example.

Method 2: A variation of the method 1.  Issue the following command

$ find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort | uniq -c | sort -n

This will list with counts for each extension (sort -n is for ordering by file number).

See the pic below for an example.

More flags about sort command can be found here (PDF) and here (PDF).

 

For more commonly used Linux commands, check my other posts at here  and here .