fd command in Linux


In this tutorial, how to use fd command in Linux. fd command-line tool to find files in the file system. this tool is very simple.

Install fd command

Using apt to install fd on Ubuntu Server.

sudo apt-get install fd-find

(Optional) Create an alias for fd that refers to fdfind.

alias fd=fdfind

(Optional) To make the alias permanent.

vi ~/.bashrc
#Add this entry to the bashrc file
alias fd=fdfind

Use fd command in Linux

Before using fd command in Linux, we need to read the help of the command.

# fd --help

The output terminal as below

fd command in Linux

find all files that were changed before a specified number of days

$ fd index /home/vagrant --changed-before 365d

Finding Files Inside a Specific Directory

$ fd password /etc
fd command in Linux 01

Finding Files Based on Extension

$ fd -e html
fd command in Linux

Finding Hidden Files

$ fd -H bash
fd command in Linux 03

More details information about fd command.

man fd
fd command in Linux 06


fd command is a simple command in Linux. It uses the number of lines of files. Thank you for reading the DevopsRoles page!


About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.