In *nix family of operating systems, we can find a file easily with the help of find command.
SYNTAX : $ find {directory-name} -name {filename}
To find a file in root directory :
Sometimes, it happens that we don't have any clue about the location of the file we are trying to search. In such a case we can search the entire system via the root directory (/). For example, if we want to search for a file named demo.txt, but we don't know where it could probably be present, then we would do something like this :
$ sudo find / -name 'demo.txt'
NOTE : Sometimes we may need special privileges to search for a particular file, so we'll use 'sudo' for that.
To find a file in a specific directory :
If we know the probable location of the file, but not sure about it, we can do this :
$ sudo find /path/of/the/directory -name 'demo.txt'
Subscribe to:
Post Comments (Atom)
How to work with Avro data using Apache Spark(Spark SQL API)
We all know how cool Spark is when it comes to fast, general-purpose cluster computing. Apart from the core APIs Spark also provides a rich ...
-
Hive is a wonderful tool for those who like to perform batch operations to process their large amounts of data residing on a Hadoop cluster ...
-
HBase shell is great, specially while getting yourself familiar with HBase. It provides lots of useful shell commands using which you ca...
-
SSH (Secure Shell) is a network protocol secure data communication, remote shell services or command execution and other secure network ser...
No comments:
Post a Comment