DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: some unix q

  1. #1
    Join Date
    Nov 2000
    Posts
    416

    some unix q

    How can I list contents of a directory and all of its subdirectories, providing full details, but only regular files that haven’t been accessed in the last 2 days?

    How can I delete all files older than 1 year from a directory?

    What utility would you use to swap columns 1 and 2 in a text file?
    An ounce of prevention is worth a pound of cure

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

    Re: some unix q

    Originally posted by farrokhp
    How can I list contents of a directory and all of its subdirectories, providing full details, but only regular files that haven’t been accessed in the last 2 days?
    man find

    How can I delete all files older than 1 year from a directory?

    man find

    What utility would you use to swap columns 1 and 2 in a text file?
    man sed
    Jeff Hunter

  3. #3
    Join Date
    Jan 2003
    Posts
    141
    find /dir/ -type d will list all the dir and sub dir.

    To list file older than a yr:

    find /db/rceireg1/ -mtime +365 -ls

    +365 above 365 from current day


    Many Thanks!

Posting Permissions

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


Click Here to Expand Forum to Full Width