Rm files by date unix




















Show Posts. Registered User. Join Date: Sep Hello, How can I remove files older than yesterday or the day before or a given day Thank you in advance. Join Date: Feb Thank you for your advice. That's OK for me. Shell Programming and Scripting. I need a script file for backup zip or tar or gz of old log files in our unix server causing the space problem. Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the Connect to a Hidden Wi-Fi Network.

Change the Size of the Touch Keyboard. Reader Favorites Take Screenshot on Windows. Mount an ISO image in Windows. Boot Into Safe Mode. Where to Download Windows Legally.

Find Your Lost Product Keys. Clean Install Windows 10 the Easy Way. The Best Tech Newsletter Anywhere Join , subscribers and get a daily digest of news, geek trivia, and our feature articles.

This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.

The second argument, -mtime, is used to specify the number of days old that the file is. The third argument, -exec, allows you to pass in a command such as rm. This should work on Ubuntu, Suse, Redhat, or pretty much any version of linux. Everything You Need to Know.

Please tell me how to do it? Try this one. No Account? Sign up. By signing in, you agree to our Terms of Use and Privacy Policy. Already have an account? Sign in. By signing up, you agree to our Terms of Use and Privacy Policy. Enter the email address associated with your account. We'll send a magic link to your inbox.

How should i do it? Please help. To delete all lines prior to Jun How do I delete all files that contain specific text? Hi all, I want to remove the files from a folder whcih contain a specific text in it. How to delete specific files only. Hello, I have these files in my directory. RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands.

FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Forum Rules. Mark Forums Read.



0コメント

  • 1000 / 1000