Skip to main content
CLI: System & Web

CLI: System & Web #


buku (browser bookmark manager) #

Repository: jarun/buku: Browser-independent bookmark manager

cd #

Online manual: cd(1p) - Linux manual page

# Go to home
cd ~

# Go to last directory
cd -

ls #

exa #

Repository: ogham/exa: A modern version of ‘ls’.
Documentation: Command-line options · exa

  • Modified date in reverse order (newest on top): exa --long --reverse --sort=modified or ll -rs=mod with alias below.
  • Always put folders on top: exa --group-directories-first

Useful alias:

alias ls='exa --all --icons'
alias ll='exa --all --icons --header --long'
alias lt='exa --all --icons --header --long --tree --level=2'

man #

tldr #

Repository: tldr-pages/tldr: 📚 Collaborative cheatsheets for console commands
Documentation: tldr pages


tldr cat
# cat
# Print and concatenate files.
# - Print the contents of a file to the standard output:
#     cat file
# - Concatenate several files into the target file:
#     cat file1 file2 > target_file
# - Append several files into the target file:
#     cat file1 file2 >> target_file
# - Number all output lines:
#     cat -n file
# - Display non-printable and whitespace characters (with `M-` prefix if non-ASCII):
#     cat -v -t -e file

mv #

Ref: Shell Command Language

Batch change filename: (credit 1, 2)

# add text before filename
for f in *; do mv "$f" "something-${f%}"; done

# add text after filename but before extension
for f in *.txt; do mv "$f" "${f%.txt}-something.txt"; done

# change extension
for f in *.txt; do mv "$f" "${f%.txt}.html"; done

ping #

nmap (ping for local devices) #

  • Ping iPhone: nmap -Pn <ip address>

ranger (file manager) #

Repository: ranger/ranger: A VIM-inspired filemanager for the console

Add some icons: alexanderjeurissen/ranger_devicons: Ranger plugin that adds file glyphs / icon support to Ranger

top #

Online manual: top(1) - Linux manual page

Activity monitor in the shell.

  • Help: ?
  • Sort by name: o
  • Search by pid: O

htop #

Repository: hishamhm/htop: htop is an interactive text-mode process viewer for Unix systems. It aims to be a better ’top’.
Online manual: htop(1) - Linux manual page

tree #

Homepage: The Tree Command for Linux Homepage

Online manual: Manpage of TREE

List files and folders in current directory.

tree -a -L 1 <path>
# -a: all files
# -L 1: only first level