Lompat ke konten Lompat ke sidebar Lompat ke footer

fd — Alternatif Perintah Find di Linux

fd — Alternatif Perintah Find di Linux. Bagi kalian pengguna GNU/Linux tentu familiar dengan perintah find. Nah disini saya akan share salahsatu alternatif dari perintah find yakni fd. Perintah fd sendiri fungsinya sama seperti find, yakni untuk mencari string ataupun file berdasarkan inputan dari pengguna.


  • Convenient syntax: fd PATTERN instead of find -iname '*PATTERN*'.
  • Colorized terminal output (similar to ls).
  • It's fast (see benchmarks below).
  • Smart case: the search is case-insensitive by default. It switches to case-sensitive if the pattern contains an uppercase character*.
  • Ignores hidden directories and files, by default.
  • Ignores patterns from your .gitignore, by default.
  • Regular expressions.
  • Unicode-awareness.
  • The command name is 50% shorter* than find :-).
  • Parallel command execution with a syntax similar to GNU Parallel.

Untuk Ubuntu dan Debian, kalian bisa download paket deb nya dari GitHub.
wget https://github.com/sharkdp/fd/releases/download/v7.3.0/fd-musl_7.3.0_amd64.deb
sudo dpkg -i fd-musl_7.3.0_amd64.deb
Untuk distro lain ada paketnya di repository.
dnf install fd-find
Arch Linux
pacman -S fd
emerge -av fd
zypper in fd
Void Linux
xbps-install -S fd
Menggunakan Perintah fd
Untuk mengecek seluruh perintah yang dapat digunakan, cek
fd -h
yuyudhn@YuzurihaInori:~$ fd -h
fd 7.3.0

    fd [FLAGS/OPTIONS] [] [...]

    -H, --hidden            Search hidden files and directories
    -I, --no-ignore         Do not respect .(git|fd)ignore files
        --no-ignore-vcs     Do not respect .gitignore files
    -s, --case-sensitive    Case-sensitive search (default: smart case)
    -i, --ignore-case       Case-insensitive search (default: smart case)
    -F, --fixed-strings     Treat the pattern as a literal string
    -a, --absolute-path     Show absolute instead of relative paths
    -L, --follow            Follow symbolic links
    -p, --full-path         Search full path (default: file-/dirname only)
    -0, --print0            Separate results by the null character
    -h, --help              Prints help information
    -V, --version           Prints version information

    -d, --max-depth             Set maximum search depth (default: none)
    -t, --type ...           Filter by type: file (f), directory (d), symlink (l),
                                       executable (x), empty (e)
    -e, --extension ...           Filter by file extension
    -x, --exec                    Execute a command for each search result
    -X, --exec-batch              Execute a command with all search results at once
    -E, --exclude ...         Exclude entries that match the given glob pattern
    -c, --color                  When to use colors: never, *auto*, always
    -S, --size ...               Limit results based on the size of files.
        --changed-within     Filter by file modification time (newer than)
        --changed-before     Filter by file modification time (older than)

        the search pattern, a regular expression (optional)
    ...    the root directory for the filesystem search (optional)

Note: `fd -h` prints a short and concise overview while `fd --help` gives all details.

fd adalah alteratif dari perintah find di Linux yang dapat kalian gunakan dengan beberapa kelebihan yang tidak ada di find.

Sekian tutorial kali ini, semoga bermanfaat. Jika ada yang ingin ditambahkan silahkan komentar.

Posting Komentar untuk "fd — Alternatif Perintah Find di Linux"