Tag: Linux

  • frequently-used keyboard shortcuts for my mail clients

    I am practicing inbox zero for which I follow a simple routine to check all my mails

    • move those mail to relevant labels/folders
    • delete the message
    • forward it to read later – Instapaper
    • add as task or a todo item – basically mark for followup
    • or reply

    Basically, my email management workflow follows only these principles and I need to sort my mails based on the above rule

    The Problem: Multiple devices with multiple mail clients

    I use Windows, Linux, Mac and Iphone and an Android tablet. Following up with mails on these devices can be time consuming and often exhaustive and I spend most of my time searching for shortcuts to ease my mail management.

    I tried to follow a simple routine and use the browser to access Gmail, reading emails on the browser can be difficult as I am not able to find any keyboard shortcut which can help me read the mail.

    When I decide to use Thunderbird mail client on my windows machine I know a few excellent keywords but its helpful only till I am using thunderbird and once I move to use mac. then again the same issue starts searching for keyboard shortcuts for mac mail.

    I have spent quite some time googling to find keyboard shortcuts for my different mail client as I use them.

    So to save me from my regular arduous task of searching for keyboard shortcuts, I put this page to act as a golden source of the frequently used keyboard shortcuts I need while going through mail clients.

    Keeping the list simple limiting to the tasks I want to do with my mails and really not an extensive list of keyboard shortcuts for all the activities you can do with the mail client

    TaskThunderbirdMac MailWeb GmailOutlook Windows
    Reply to a mailCtrl + R
    Ctrl + Shift + R – Reply All
    Command-R
    Shift-Command-R – Reply All
    r
    a – reply all
    Ctrl+R
    Ctrl+Shift+R – Reply all
    Write a new mailCtrl+MCommand-NcCtrl+N
    Forward a mailCtrl + LShift-Command-FfCtrl+F
    Send MessageCtrl+Enter
    Ctrl+Shift+Enter – Send Later
    Shift-Command-D/Ctrl + EnterAlt+S
    Archive MessageAControl-Command-Ae
    Move MessageDrag message to destination folder.vCtrl+Shift+S
    Add as a taskShift + t
    b – snooze
    Ctrl+Shift+K
    DeleteDelDel#Ctrl+Shift+D
    Message filterCtrl + Shift + K
    Command-L
    Follow upbCtrl+Shift+G
    Keyboard Shortcuts linksThunderbird Keyboard ShortcutsMail on MacGmail Keyboard ShortcutsOutlook Keyboard Shortcuts
    keyboard shortcuts for the mail clients

    Please feel free to use the resource as your handy cheat sheet, and if you know the solutions or shortcuts for the empty slots do let me know and I will update the table.

  • find all files in current folder & subfolders

    We all know Linux is all about files and folders and there are times when we just want to recursively find files in Linux based on wildcard match in the current folder and its subfolders.

    A simple answer is to use the find command like below

    find . -name "foo*"

    But as sysadmins we will not limit ourselves to just the find command, so let’s jump in a little deeper and see various ways to achieve something trivial.

    A much faster way is to use locate command, but this command is dependent on updatedb, assuming we have our updatedb updated, simple run

    locate "$PWD" | grep -P <pattern>

    to find any file quickly.

    Now if you have a shell with new globbing enabled(you can read more about globbing here). YOu can enable globbing using “shopt -s globstar” you can simply use below to find any files or folders recursively. This is supported by Bash 4, zsh and similar shells.

    echo **/*foo*

    or you can have a function defined in your shell

    f() { find . -name "*$1*"; }
    
    $ f some_filename

    There is also this neat utility called as fd, this is a simple and fast alternative to find, and is available at GitHub for free to download and test syntax to follow:

    fd PATTERN
    Stackoverflow User: kenorb

    If you want to look for a filename or pattern from within the current directory, you can type:

     pwd | xargs -n 1 -I {} locate "filepattern"

    However, if you want a picture:

    tree -P "*foo"

    Well, that’s it for find, please keep following my blog for more such articles.

  • Ubuntu on Windows

    Today I was struggling to work on python virtual environment and realised that running a Python Virtual env in windows is not as simple and easy as compared to Linux, the difficulty here is attributed to two major things.

    • How to activate the virtual env (including installing and setting up python)
    • Where goes your virtualenv

    Unlilke Linux, where the projects directory is in my home dir, in windows it could possible be technically anywhere if you are the only user of your system. So I decided to install Ubuntu on my windows Laptop. I have heard earlier that Ubuntu comes compaitable with Windows 10. Installing and settingup Ubuntu on Windows is fairly easy but Before i jump on telling how you should set up Ubuntu on Linux here is my quick guide of setting up python development environment on windows.

    To Setup Ubuntu Desktop Let’s quickly go to Microsoft Store installed on your windows machine and Search for Ubuntu – I got the latest Ubuntu image as Ubuntu 20.04

    Ubuntu 20.4 in microsoft store

    Downloading Ubuntu doesn’t really make it work. We need to do some tweaking with our windows machine, before we can actually launch Ubuntu Linux.

    While I clicked on the Launch Button, I got this error

    Here we need to enable the Linux Subsystem for Windows, a detailed guide on how to enable the subsytem is provided by Microsoft here.

    Step 1 – Enable the Windows Subsystem for Linux

    Open PowerShell as Administrator and run:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

    Step 2 – Enable Virtual machine feature

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

    and thats it. Though i later on went ahead and got WLS2 enabled. The command and guide for that also given with the above document from Microsoft.