Results 1 to 2 of 2

Thread: Awk/bash scripting help... clean-up script

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked
    0 times in 0 posts

    Awk/bash scripting help... clean-up script

    I gotta write a script that will search a directory put on the command line and any sub-directories of that directory for temp files/directories that meet these criteria:

    Temp file and temp directory names will begin with a comma (,).
    if they have not been modified in 5 days
    only users with user ids greater than or equal to 500 will be checked for temp files and directories (if not, terminate with a message)

    I don't even know where to start... this isn't my usual cup of tea. An example, or just some simple help would be SO APPRECIATED. Thank yous!

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    why would you use awk to do this? it's an obvious use for find (find . -name ",*" -ctime +5 -uid +500)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Shopping Cart script
    By TiMeZeRo in forum General Discussion
    Replies: 0
    Last Post: 22-09-2006, 01:33 PM
  2. Simple script required
    By Taz in forum Software
    Replies: 1
    Last Post: 02-08-2006, 04:31 PM
  3. Replies: 0
    Last Post: 10-02-2006, 11:28 PM
  4. I need advice on how to clean my MX5!
    By Pyramus in forum Automotive
    Replies: 20
    Last Post: 02-06-2005, 09:18 AM
  5. How-To: HDD Window Mod Clean Box
    By Steve in forum HEXUS News
    Replies: 0
    Last Post: 02-05-2005, 08:39 PM

Posting Permissions

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