The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find files older than 30 days anushree.a Shell Programming and Scripting 4 07-08-2009 08:43 AM
Find files older than 30 days in directories and delete them lamoul Red Hat 2 03-21-2009 01:44 PM
Find files older than x days and create a consolidated single tar file. Dawn Bosch SUN Solaris 3 09-09-2008 05:45 AM
Find files older than 20 days & not use find halo98 Shell Programming and Scripting 2 05-18-2006 02:19 PM
Find files older than 5 days and remove tem after listing ypatel6871 UNIX for Dummies Questions & Answers 1 09-05-2005 11:00 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-08-2009
Pouchie1 Pouchie1 is offline
Registered User
  
 

Join Date: May 2009
Posts: 36
Find files older than 10 days

What command arguments I can use in unix to list files older than 10 days in my current directory, but I don't want to list the hidden files.

find . -type f -mtime +15 -print will work but, it is listing all the hidden files., which I don't want.
  #2 (permalink)  
Old 07-08-2009
daptal daptal is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 60
find . -type f -mtime +15 -print |grep -v '^\.\/\.'

will remove the hidden files of type ./.hidden.xyz

Cheers
  #3 (permalink)  
Old 07-09-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
Code:
find . -type f ! -name '.??*' -mtime +15 -print
  #4 (permalink)  
Old 07-12-2009
Pouchie1 Pouchie1 is offline
Registered User
  
 

Join Date: May 2009
Posts: 36
Thanks for your post. I tried both commands strings and I still couldn't get it to work. I tried to find the files first before sending it to the -exec rm. I still tons of hidden files.

Not sure why they are not working. They seem to be ok to me.

I will keep researching, but if anybody can come if any other idea, I will appreciate
  #5 (permalink)  
Old 08-19-2009
scripter.online scripter.online is offline
Registered User
  
 

Join Date: Jul 2009
Location: India
Posts: 31
Hi,

Code:
 
$ ls -la | grep ^-
-rwxr-xr-x    1 scripter     scripterworld        342 Aug 19 23:15 filevalid.sh
-rw-r--r--    1 scripter     scripterworld          0 Aug 20 00:47 .hidden1
-rw-r--r--    1 scripter     scripterworld        307 Aug 19 20:15 testdir.sh
$ find . -type f ! -name ".*" -print
./testdir.sh
./filevalid.sh
$
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0