Command Reference
File & Search
File operations and search commands
File & Search Commands
File Operations (20 commands)
| Alias | Expands To | Description |
|---|---|---|
h <file> [n] | head -n {n|50} <file> | Show first n lines (default 50) |
t <file> [n] | tail -n {n|50} <file> | Show last n lines (default 50) |
l <file> | cat -n <file> | Print file with line numbers |
v <file> | less <file> | View file in pager |
e <file> | $EDITOR <file> | Open in editor |
w <file> <content> | write | Write content to file |
a <file> <content> | append | Append content to file |
x <file> | test -e <file> | Check if file exists |
i <file> | stat <file> | File info |
d <file> --force | rm <file> | Delete file (requires --force) |
cp <src> <dst> | cp <src> <dst> | Copy file or directory |
mv <src> <dst> | mv <src> <dst> | Move/rename file |
cat <file> | cat <file> | Print entire file |
touch <file> | touch <file> | Create empty file |
wc <file> | wc -l <file> | Count lines |
sz [path] | du -sh <path> | Directory/file size |
ch <file> | chmod +x <file> | Make executable |
ln <src> <dst> | ln -s <src> <dst> | Create symlink |
hd <file> | hexdump -C <file> | Hex dump |
md5 <file> | md5sum <file> | MD5 checksum |
Search & Find (13 commands)
| Alias | Expands To | Description |
|---|---|---|
sf <pattern> | find . -name <pattern> | Find files by name |
sft <ext> | find . -name *.<ext> | Find by extension |
sfe <name> <cmd> | find … -exec <cmd> | Find and execute |
sfs <size> | find . -type f -size +<size> | Find files larger than |
sg <term> [dir] | grep -rn <term> <dir> | Recursive grep |
sl <term> <dir> | grep -rn <term> <dir> | Grep in directory |
si <term> | grep -rn import <term> . | Search imports |
sc <pattern> | grep -rn <pattern> . | Search code |
sr <old> <new> <file> | sed -i 's/old/new/g' file | Search & replace |
rg <term> [dir] | rg <term> <dir> | Ripgrep search |
rgf <term> [dir] | rg -l <term> <dir> | Ripgrep filenames only |
rgc <term> [dir] | rg -c <term> <dir> | Ripgrep count |
todo [dir] | grep -rn TODO|FIXME… | Find all TODOs |