![]() ![]() If we need to list the file under the current directory and its name is ‘test’, we can use this command.Ībsolute path is a complete path from the start of the actual filesystem from / directory. To list all files in the current directory, we can use the following command./ means current directory. One file was in the user’s home directory and the other file was in the /tmp directory. The output of this command will look something like this:Īs you can see, this command was able to find two files with the name “test.txt”. This command will search through all of the directories on your system for a file named “test.txt“. To do this, we will use the following command: In this example, we will search for all files with the name “test.txt”. ![]() We can use the find command to search for all files with a specific name. Find All Files With A specific Name in Linux You can combine the -name option with other find options, such as specifying the starting directory, specifying the type of files to search (-type f for regular files), and using the -exec option to perform actions on the matched files or directories.
0 Comments
Leave a Reply. |