Find all file names that start with 'App' find path/to/folder -name "App*" Show the next 3 lines (trailing context) after a match cat Foo.swift | grep -A 3 methodA