Hi, How can I search any file in Unix from home directory? File is in sub directory. Search a file in dir and sub dir. Thanks in advance.
Thanks for your reply. I got it find / -name "filename.extension" This lists all paths of the file in dir and subdirs also.
Find files with the Linux find command : This first Linux find example searches through the root filesystem ("/") for the file named "Chapter1". If it finds the file, it prints the location to the screen. find / -name Chapter1 -type f -print A nice thing to know is that on Linux systems and modern Unix system you no longer need the -print option at the end of the find command, so you can issue it like this: find / -name Chapter1 -type f This next find command searches through the /usr and /home directories for the file named Chapter1: find /usr /home -name Chapter1 -type f To search in the current directory, and all subdirectories, just use the . character to reference the current directory in your find commands, like this: find . -name Chapter1 -type f