answersLogoWhite

0


Best Answer

Use the 'find' command. There are many different ways of searching, etc., so I suggest you take a look at the 'man find' or 'info find' commands to see all the different ways of doing the search.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you search a file in unix without knowing its directory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a basename?

A basename is a file name without any path or directory information.


How do you find your wow realmlist?

To find the realmlist go to the \Data\enUS directory in your world of warcraft folder and click on the realmlist.wtf file. That is where the realmlist is at, although modifying this without knowing what you are doing can be bad. There really is no reason to touch this file without being told so by a Blizzard tech support person.


Can you file for a divorce without knowing the date you were actually married?

no


In Unix what is the command for Displaying whether a file is a simple file or a directory?

Use the file type test: if [ -d $file ]; then echo $file is a directory elif [ -f $file ]; then echo $file is a file else echo $file is not a directory or a file fi


What does drwxrw-r-- in Linux mean?

This is a display of file permissions. In particular, it means:drwxrw-r-- - The specified object is a directory, not a filedrwxrw-r-- - The file / directory can be read by its ownerdrwxrw-r-- - The file / directory can be modified by its ownerdrwxrw-r-- - The file / directory can be executed as a binary by its ownerdrwxrw-r-- - The file / directory can be read by members of the specified groupdrwxrw-r-- - The file / directory can be modified by members of the specified group.drwxrw-r-- - The file / directory cannot be executed by members of the specified group.drwxrw-r-- - The file / directory can be read by others not in the group.drwxrw-r-- - The file / directory cannot be modified by others not in the group.drwxrw-r-- - The file / directory cannot be executed by others not in the group.


How do you search fo a particular file in MS DOS?

Go to the root directory of the drive (eg c:\), then type: dir <filename> /s For example, to search for the file fred.doc, you would type: dir fred.doc /s Adding /s to the dir makes dos search all the subfolders, so starting in the root directory makes dos search the entire disk.


How do you search fo a particular file in MS-DOS?

Go to the root directory of the drive (eg c:\), then type: dir <filename> /s For example, to search for the file fred.doc, you would type: dir fred.doc /s Adding /s to the dir makes dos search all the subfolders, so starting in the root directory makes dos search the entire disk.


Put file in the same directory as my HTML file?

Yes you need to put the file in the same directory. This will get the file to be executed from the HTML file.


What is the main file directory in Linux?

It is the Home Directory.


Can a directory be called a file?

Yes. A directory can be called a file and, in most implementations, under the wraps, it is a file, but it is not a file that an ordinary user can access. It is the responsibility of the file system code in the operating system. Unless you are writing code that manages file systems, it is best to think of a directory as a directory and to use the API provided to access it.


What is a multi-level directory system?

A directory is a logical grouping of files. By maintaining several directories the file manager can permit the same file name to be used in separate directories to refer to independent copies of the same file or completely different files. The contents of a directory - a list of file names and their associated information - are stored in a special file called a directory file which is assigned a file name which distinguishes it from non-directory files. By allowing directory file names to appear alongside non-directory file names in a directory, the file manager is able to link separate directories hierarchically as shown in figure 1. The directory at the top of the structure is given the special name, ROOT because the hierarchical structure resembles an upside-down tree. The directories below the root directory are known as subdirectories. by earnie


What is a hidden file?

A file that does not appear in the directory list.