Re: changing time on a symlink
On Wed, Oct 28, 1998 at 07:28:43PM -0800, Salil Kumar wrote: Hi, How can we change the time on a sym link through a C program ? look at utime (man 2 utime)
Re: changing time on a symlink
ixx wrote: On Wed, Oct 28, 1998 at 07:28:43PM -0800, Salil Kumar wrote: Hi, How can we change the time on a sym link through a C program ? look at utime (man 2 utime) Hi,I think utime change the time for the file pointed by sym link. I need to change the time of symlink only. Any other suggestions ? -salil
Re: changing time on a symlink
Salil Kumar wrote: I need to change the time of symlink only. Any other suggestions ? I think the only way is to use the time/date hack. 1. remove the link 2. set the clock to when the link should be modified 3. recreate the link 4. reset the clock to current date/time. There are wery few syscalls that affects symbolic links besides symlink(), lstat() and readlink(). Of these symlink() is the only one that can modify the modification date, and only to the current date/time. --- Henrik Nordstrom
RE: Newbie: Searching sub directories for text
This works too: find /dirname -exec grep -l 'whatever text' {} \; -Original Message- From: Glynn Clements [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, October 28, 1998 4:30 PM To: Dave Cc: [EMAIL PROTECTED] Subject:Re: Newbie: Searching sub directories for text Dave wrote: How can I search a directory and all of its sub directories for a file containing a specified text string. Use find and [f]grep. I know how to use grep to search a single directory but is there a way to make it search all of the sub directories too? I tried using Find along with Grep: find / -type f -print | xargs grep string_to_search_for In general, find / -type f -print0 | xargs -0 grep string_to_search_for is preferable, as it will cope with filenames which contain spaces. But I get the error message: grep: warning: /proc/kcore: operation not supported by device Don't search /proc. You can use find / -path /proc -prune -o ... to eliminate just /proc, or find / -mount ... to prevent find from crossing filesystem boundaries. It trys to search files that grep can not deal with, generates error messages and fills the screen up with junk. Is there a way to limit the search to scripts, config files and source files? Not easily. You would have to have to run `file' on each file that is found, and only run grep if the output from file indicates that it is suitable. Maybe there is another program that I should be using?? Not really. There isn't a `is this a text file' utility as such. -- Glynn Clements [EMAIL PROTECTED]
No Subject
10/29/98 Y2K Solution! 8 Pine Circle Dr., Silicon Valley, Calif. OTC Company "TCFG" 21 st. Century Frontier Group has through several members of their administrative research department leaked vital information about their companies efforts. Everyone was tight lipped and interviews were refused, and through un-named sources we have learned that the technology and software solution are in the process of being patented! In over 1640 trials, using various data systems the use of the new technology and software solved the Y2K problem 100% of the time. This small publicly traded company "TCFG" which is just 3 years old is through various sources now negotiating with the "Big Boys"! "TCFG" the letters to look for!
FREE DEMO of Web Promotion Software that Puts You On Top of 1,000+ Search Engines!
Greetings! I thought I would take some time today to let you know about a wonderful new software package that will dramatically increase your web site's visibility. It's called The Spider, and I have been using it for several months and enjoyed a tremendous increase in my website's traffic. This software has impressed me so much that I decided to buy the reseller rights to it. And now, we are offering it on a FREE DEMO basis. Before I let you in on our secret download location, let me tell you a bit more about it. 1) 1000 + Supported Search Engines (Pro), 450 for standard edition 2) Batch Processing - allows you to take control of your website promotions - for all of your pages and sites. With a built in on-board database and batch processing, you can accurately register as many sites or pages as you like, all at once. 3) Categorized submissions - accuracy is critical when placing your site; our program recognizes and properly places you in all of our supported search engines. Don't be fooled by the competition - the shotgun approach does not work! 4) True CGI based registration - while other programs simply email your site information to search engine webmasters in the vain hope they will manually enter your information, The Search Engine Spider interacts with the server directly, custom formatting your site information for each and every supported engine. 5) Small Size, Fast Execution : The Spider is written entirely in the C programming language, and takes advantage of the true 32 bit multithreaded programming environment provided therein. It's fast: in our internal testing, the new program will perform 450 individual registrations in just under 18 minutes. Testing was done on a 28.8 dialup line. 6) Automatic Update Feature: No more weekly and monthly downloads! In an effort to keep up to date with search engine changes and updates, we have now incorporated a feature that will automate this task. Here's how it works: a.. Each time the program is loaded, it will automatically connect to our server and verify that the current search engine database is loaded on your user's machine. If it is not, it will automatically initiate a download. b. Once the download is complete (typically 20-30 seconds on a 28.8K connection), normal program operation will resume with the new database. 7) Improved Error Checking: anytime an error is generated during submission, by any user anywhere, the program updates our server with the search engine name, time and date of the error, and the nature of the error. Our resource manager for this project checks his log daily and investigates each and every error and has the ability to dynamically and instantly update the master database with the corrections. Once the correction is made, the Automatic Update Feature kicks in, distributing the updated registration database to every user worldwide the next time they use the program. To get your FREE DEMO of this amazing software, please visit: http://www.hiredhits.com/ If you would prefer us to send you a CD with The Spider, along with free demos of over 10 of our other web promotion software packages, please visit: http://www.hiredhits.com/order/process_cd.htm If you are having problems connecting to the above links, please give us a call at 773-271-8484 and we will arrange another way for you to get your FREE DEMO. Thanks again for your time and please let me know if you have any questions. Best Regards, Amy Horowitz MasterPromote, Inc. 120 Broadview Village Square Suite 315 Broadview, IL 60153 773-271-8484 [EMAIL PROTECTED] * To remove yourself from this mailing list, please visit http://www.hiredhits.com and we will promptly remove your name from future mailings. Sorry for any inconvenience we may have caused
Re: changing time on a symlink
Henrik Nordstrom wrote: Salil Kumar wrote: I need to change the time of symlink only. Any other suggestions ? I think the only way is to use the time/date hack. 1. remove the link 2. set the clock to when the link should be modified 3. recreate the link 4. reset the clock to current date/time. Thanks for the suggestion, but If we change system time, and if the next CPU slice goesto some utility acting on system time, (cron jobs etc.) will not this solution work adversely ? Currenty I am working on a restore solution, I can restore all files correcty, but when I go back to change dates on the restored data, I cannot do it for symbolic links. There are wery few syscalls that affects symbolic links besides symlink(), lstat() and readlink(). Of these symlink() is the only one that can modify the modification date, and only to the current date/time. --- Henrik Nordstrom
Re: changing time on a symlink
Salil Kumar wrote: Thanks for the suggestion, but If we change system time, and if the next CPU slice goesto some utility acting on system time, (cron jobs etc.) will not this solution work adversely ? Yes. There are some major drawbacks from changing the system time. Currenty I am working on a restore solution, I can restore all files correcty, but when I go back to change dates on the restored data, I cannot do it for symbolic links. No-one can. Symbolic links always have the current date after a restore... --- Henrik Nordstrom
Re: changing time on a symlink
Salil Kumar wrote: I need to change the time of symlink only. Any other suggestions ? I think the only way is to use the time/date hack. 1. remove the link 2. set the clock to when the link should be modified 3. recreate the link 4. reset the clock to current date/time. Thanks for the suggestion, but If we change system time, and if the next CPU slice goesto some utility acting on system time, (cron jobs etc.) will not this solution work adversely ? Yes. Changing the system time is a bad idea. Currenty I am working on a restore solution, I can restore all files correcty, but when I go back to change dates on the restored data, I cannot do it for symbolic links. No, you can't. -- Glynn Clements [EMAIL PROTECTED]