Initial commit
This commit is contained in:
46
skills/searching-files/reference/linux.md
Normal file
46
skills/searching-files/reference/linux.md
Normal file
@@ -0,0 +1,46 @@
|
||||
### Searching
|
||||
|
||||
Search current directory and subdirectories
|
||||
|
||||
fd "search term"
|
||||
|
||||
Find all PDFs
|
||||
|
||||
fd -e pdf
|
||||
|
||||
Find files by name
|
||||
|
||||
fd -g "\*.txt"
|
||||
|
||||
Search file contents for “config”
|
||||
|
||||
rg "config"
|
||||
|
||||
#### Reading & Converting Files (with pandoc)
|
||||
|
||||
Convert PDF to text
|
||||
|
||||
pdftotext document.pdf
|
||||
|
||||
# or via pandoc
|
||||
|
||||
pandoc document.pdf -t plain -o document.txt
|
||||
|
||||
Convert Word document to text
|
||||
|
||||
pandoc document.docx -t plain -o document.txt
|
||||
|
||||
Convert RTF or HTML to text
|
||||
|
||||
pandoc document.rtf -t plain -o document.txt
|
||||
pandoc document.html -t plain -o document.txt
|
||||
|
||||
Batch convert all PDFs to text
|
||||
|
||||
for f in \*.pdf; do pdftotext "$f" "${f%.pdf}.txt"; done
|
||||
|
||||
#### Summary
|
||||
|
||||
• fd replaces mdfind for fast file search.
|
||||
• rg (ripgrep) replaces Spotlight content search.
|
||||
• pandoc + pdftotext replace textutil for format conversion.
|
||||
Reference in New Issue
Block a user