Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing files from Solaris

Status
Not open for further replies.

armylogman

Technical User
Feb 16, 2005
34
US
I have files in a Solaris 9 x86 system that I can do a #ls and see certain files but if I do a ls -al I can't see the files, I am trying to remove the files and I get an I/O error any suggestions on how to remove the files.
Thanks
 
Can you show us a sample of the output from #ls (I'm assuming the # is the prompt?).

The internet - allowing those who don't know what they're talking about to have their say.
 
Hi,

I am trying to remove files on solaris 10 older than an hour old. I have used generic find and /usr/xpg4/bin/find but cannot seem to list the files I need.
Can you please assist with whether Solaris can handle the file manipulation in hourly format. The generic find command doesn't appear to like anything in fraction but only in number of days.

 
You should start your own thread for a new question normally... but since this thread seems to be an orphan anyway it was probably kind of you to adopt it. :)

Solaris' (and most major Unix vendors') find lacks the handy -mmin and similar GNU options that give finer-grained accuracy than the -mtime style equivalents.

A workaround is to touch a temporary file with a timestamp of an hour ago, and then use the ! -newer logic.

Code:
# date
Tue Jul 12 10:39:48 EST 2011
# touch -t 07120939 /tmp/hourago
# find /somedir ! -newer /tmp/hourago

Of course, assuming this will be automated, the time subtraction introduces its own fun and games...

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top