Bunch of files exist in a directory. Some files have 1 line in it, some files have more number of lines.I'm trying to display filenames from a particular directory(with full path),  where the linecount in the file is > 2.I am up to here, to display files in a directory.find /abc/def -maxdepth 1 -type f
List of files where the line count is greater than 2
command
Try this command:find . -maxdepth 1 -type f \    -exec sh -c 'test $( wc -l {} | cut -f1 -d  ) -gt 2' \; -printyou have to be careful if some alien file called $(rm -rf ~) is found in your directory, this may cause the command to delete all of your data in that directoryfind . -maxdepth 1 -type f search for files in the current directory for depth 1 which means don't descend into subdirectories-exec sh -c  execute a command where here I'm running a script for one command'test $( wc -l {} | cut -f1 -d  ) -gt 2' this is the command which is counting number of lines of each file greater than 2. Then print the output  