Welcome to the Linux Foundation Forum!

command line to search files and save output to a file

Hi all,

Please advise the command line to find all files containing a string "Deny from all" on ./ and save all files found to a file (which not created yet)

Thanks

Regards

Answers

  • I think try:

    grep -l 'Deny from all' /home/ > /tmp/list.txt

    /tmp/list.txt is of course can be changed to any file name or folder name you wish

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training