Find the answer to your Linux question:
Results 1 to 3 of 3
Hello All, I am creating script which will find all hidden files and append content of all those hidden file to one new file. My following command showing all hidden ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    17

    Need help to create script


    Hello All,

    I am creating script which will find all hidden files and append content of all those hidden file to one new file.

    My following command showing all hidden files in working directory

    ls -Al | grep -v '^d' | cut -c 55- | grep '^\.'

    But I am not sure How to get content of each file?

    Is any one can help me?

    Thanking You,

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    look into cat for reading contents of a file.

    and i'd replace your above "ls .." line with a "find" command that can do all that with find's built-in functions.

  3. #3
    Just Joined!
    Join Date
    Oct 2011
    Posts
    17
    Thanks for your reply. I did it using find.

    Best Regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •