Home / Linux / Finding what you’re looking for on Linux

Finding what you’re looking for on Linux

It isn’t hard to find what you’re looking for on a Linux system — a file or a command — but there are a lot of ways to go looking.

7 commands to find Linux files

find

The most obvious is undoubtedly the find command, and find has become easier to use than it was years ago. It used to require a starting location for your search, but these days, you can also use find with just a file name or regular expression if you’re willing to confine your search to the local directory.

$ find e*
empty
examples.desktop

In this way, it works much like the ls command and isn’t doing much of a search.

For more relevant searches, find requires a starting point and some criteria for your search (unless you simply want it to provide a recursive listing of that starting point’s directory. The command find . -type f will recursively list all regular files starting with the current directory while find ~nemo -type f -empty will find empty files in Nemo’s home directory.

Loading...

>> Source Link

Check Also

The Linux Foundation Will Host the Federated AI Enabler to Responsibly Advance Data Modeling

SHANGHAI, June 24, 2019 /PRNewswire/ — KubeCon + CloudNativeCon – The Linux Foundation, the nonprofit organization …

%d bloggers like this: