Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

04 February, 2011

how to remove a user in ubuntu debian (unix)

to remove a user and their home directory, use:

sudo deluser -remove-home

to remove all of their files on the server:

sudo deluser -remove-all-files

08 February, 2010

How to delete files older then x-days on Linux

Delete Files Older then x Days on Linux - easy way
in terminal / command line

using "find" command

Code:
find *.txt -mtime +30 | xargs rm
  • "find" executing program
  • "*.txt" file
  • "-mtime +30" files older then 30 days
  • " | " pipe
  • "xargs" executing program
  • "rm" executing command