You Don't Need GUI
Graphical user interfaces are super friendly to computer users. They were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLIs).
However, they often require more resources, are less powerful and hard to automate via scripting.
As a computer expert, we want to be more efficient and do our jobs better. We know that command words may not be easily discoverable or mnemonic, so we try to list some common tasks that you might be tempted to do in GUI.
Quick links
- copy a file
- duplicate a file
- copy a directory
- duplicate a directory
- move a file
- rename a file
- move a directory
- rename a directory
- merge directories
- create a new file
- create a new directory
- show file/directory size
- show file/directory info
- open a file with the default program
- open a file in any application
- zip a directory
- unzip a directory
- peek files in a zip file
- remove a file
- remove a directory
- remove all files of certain criteria
- list directory contents
- tree view a directory and its subdirectories
- find a stale file
- show a calendar
- find a future date
- use a calculator
- force quit a program
- check server response
- view content of a file
- search for a text in a file
- search in all files in current working directory, quickly (entire disk in less than 15 minutes)
- view an image
- show disk size
- check cpu usage, processes and RAM
- know whether your computer is under load, and whether itโs due to memory or CPU
- poweroff or reboot your computer
- locate USB drives
- unmount USB drives
- format USB drives
- check USB format
- run command on all files of a directory
- check network connectivity to a remote address and port
- check DNS config of a domain
- check the ownership and registration of a domain
- Quick tips
- Hotkeys
- I canโt remember these cryptic commands
copy a file
STOP DRAG AND DROPPING A FILE, OR CMD/CTRL + C, CMD/CTRL + V A FILE :-1:
Copy readme.txt
to the documents
directory
duplicate a file
STOP RIGHT CLICKING AND DUPLICATE A FILE :-1:
More advanced:
copy a directory
STOP DRAG AND DROPPING A DIRECTORY, OR CMD/CTRL + C, CMD/CTRL + V A DIRECTORY :-1:
Copy myMusic
directory to the myMedia
directory
duplicate a directory
STOP RIGHT CLICKING AND DUPLICATE A DIRECTORY :-1:
move a file
STOP DRAG AND DROPPING A FILE, OR CMD/CTRL + X, CMD/CTRL + V A FILE :-1:
Always use a trailing slash when moving files, for this reason.
rename a file
STOP RIGHT CLICKING AND RENAME A FILE :-1:
move a directory
STOP DRAG AND DROPPING A DIRECTORY, OR CMD/CTRL + X, CMD/CTRL + V A DIRECTORY :-1:
rename a directory
STOP RIGHT CLICKING AND RENAME A DIRECTORY :-1:
merge directories
STOP DRAG AND DROPPING TO MERGE DIRECTORIES :-1:
create a new file
STOP RIGHT CLICKING AND CREATE A NEW FILE :-1:
create a new directory
STOP RIGHT CLICKING AND CREATE A NEW DIRECTORY :-1:
show file/directory size
STOP RIGHT CLICKING AND SHOW FILE/directory INFO :-1:
show file/directory info
STOP RIGHT CLICKING AND SHOW FILE/DIRECTORY INFO :-1:
open a file with the default program
STOP DOUBLE CLICKING ON A FILE :-1:
open a file in any application
STOP RIGHT CLICKING AND OPEN WITH :-1:
zip a directory
STOP RIGHT CLICKING AND COMPRESS DIRECTORY :-1:
unzip a directory
STOP RIGHT CLICKING AND UNCOMPRESS DIRECTORY :-1:
decompress files of any format
STOP RIGHT CLICKING AND UNCOMPRESS DIRECTORY :-1:
peek files in a zip file
STOP USING WinRAR :-1:
peek files in a compress file of any format
STOP USING WinRAR :-1:
remove a file
STOP RIGHT CLICKING AND DELETE A FILE PERMANENTLY :-1:
IMPORTANT: The rm
command deletes my_useless_file
permanently, which is equivalent to move my_useless_file
to Recycle Bin and hit Empty Recycle Bin.
remove a directory
STOP RIGHT CLICKING AND DELETE A DIRECTORY PERMANENTLY :-1:
remove all files of certain criteria
IMPORTANT: run find . -name "*.bak" -type f
first to see exactly which files you will remove.
list directory contents
STOP OPENING YOUR FINDER OR FILE EXPLORER :-1:
tree view a directory and its subdirectories
STOP OPENING YOUR FINDER OR FILE EXPLORER :-1:
find a stale file
STOP USING YOUR FILE EXPLORER TO FIND A FILE :-1:
Find all files modified more than 5 days ago
show a calendar
STOP LOOKING UP WHAT THIS MONTH LOOKS LIKE BY CALENDAR WIDGETS :-1:
Display a text calendar
Display selected month and year calendar
find a future date
STOP USING WEBAPPS TO CALCULATE FUTURE DATES :-1:
What is todays date?
What about a week from now?
use a calculator
STOP USING CALCULATOR WIDGET :-1:
force quit a program
STOP CTRL + ALT + DELETE and choose the program to kill :-1:
check server response
STOP OPENING A BROWSER :-1:
view content of a file
STOP DOUBLE CLICKING A FILE :-1:
search for a text in a file
STOP CMD/CTRL + F IN A FILE :-1:
search in all files in current working directory, quickly (entire disk in less than 15 minutes)
STOP CMD/CTRL + F IN A DIRECTORY :-1:
view an image
STOP USING PREVIEW :-1:
show disk size
STOP RIGHT CLICKING DISK ICON OR OPENING DISK UTILITY :-1:
check cpu usage, processes and RAM
STOP OPENING YOUR ACTIVITY MONITOR OR TASK MANAGER :-1:
if you want some more details:
know whether your computer is under load, and whether itโs due to memory or CPU
poweroff or reboot your computer
This can be useful when youโre patching a server that is acessed via SSH and you donโt have a GUI.
locate USB drives
unmount USB drives
format USB drives
check USB format
run command on all files of a directory
STOP CLICKING THE FILES ONE BY ONE :-1:
check network connectivity to a remote address and port
STOP USING NETWORK UTILITY
check DNS config of a domain
STOP USING NETWORK UTILITY
check the ownership and registration of a domain
STOP USING NETWORK UTILITY AND THE WEBSITE OF DOMAIN REGISTRATION PROVIDERS
Quick tips
Hotkeys
I canโt remember these cryptic commands
You can always google or man
the commands you are not familiar with. Or, checkout tldr, a collection of simplified and community-driven man pages.