Unlike the answer to this question () I want to be able to see content of files that haven't been created yet as or after they are created.  I don't know when they will be created or what they will be named.  That solution is for a specific file and actually mentions in the question title creating a "hook" to a specific file.  My question is different because I don't want to hook anything, and what I do want is not specific to a particular file.  My question's title specifies "..as they are created" which should be a clue that the files I am interested in do not exist yet.  I have an application that users use to submit information from a website.  My code creates output files when the user is finished.  I want to be able to see the content of these files as they are created, similar to the way tail -f works, but I don't know ahead of time what the filenames will be.  Is there a way to cat files as they are created or would I have to somehow create an endless loop that uses find with the -newermt flag  Something like this is the best I can come up with so far:  #!/bin/bash # news.sh  while true do   d=$(date +"%T Today")   sleep 10   find . -newermt "$d" -exec head {} + done   For clarification, I don't necessarily need to tail the files.  Once they are created and closed, they will not be re-opened.  Existing files will never change and get a new modification time, and so I am not interested in them.
How can I immediately detect when new files added to a folder within a  script? I would like the script to process files as soon as they are created in the folder. Are there any methods aside from scheduling a  job that checks for new files each minute or so?
Picking a $\delta$ for a convenient $\varepsilon$? I'm studying some proofs in a book from the library  and  unlike my own book, it doesn't prove by showing that a certain expression is striclty less than $\varepsilon$ (given an  appropiate $\delta$ and $\vert x-a\vert &lt; \delta$, etc). Instead, it shows that it's less than some expression involving $\varepsilon$.   E.g. Given $\varepsilon &gt; 0$, we can pick a $\delta &gt; 0$ so $|f(x) - g(a)| &lt;  \text{insert stuff} &lt; k \cdot \varepsilon$ when $|x-a| &lt; \delta$, and thus $f(x) - g(a) \to 0 $ when $x \rightarrow a$.  How does this make sense formally? (Intuitively, I am convinced.)  I don't have much experience with $\varepsilon$-$\delta$ -proofs, so I might be missing something obvious. I had a problem with the laptop lid so I am using it with an external monitor. I was wondering if there is any way to power on the laptop without opening the lid, that is through ports.  Laptop: Dell Inspiron 1525 How do you make a torus 'telescope' open? Help us find duplicates efficiently Why did I just get the Announcer Badge and the Booster badge? Today I got both the Announcer badge and the Booster badge for  that I asked last year.   I don't remember ever sharing a link to it, and it seems odd to me that I would get both badges in one day, implying that there were at least 276 people who viewed it today from a link I don't remember ever sharing.  What's going on? Don't we have single sign-on for all Stack Exchange sites? I would like to use many sites in the Stack Exchange network, but I need to login to each site separately. Though it's easy, can't we solve this problem? I know each site has a different url :( but is there any way? Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions? I entered chmod -R 777 /usr/bin and now sudo is not working.  It says sudo must be setuid root.  Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo.  On entering chown root:root /usr/bin/sudo it shows an opened in readonly mode error. Vertical text (not in table) Is the function $f(x)=|x|^{1/2}$ Lipschitz continuous near $0$? If yes, find a constant for some interval containing $0$.   I think the answer is yes since I can find $L=1$ that satisfies Lipschitz continuity criteria in a interval close to $0$, am I right? Shrink Tempdb log file when reaching a specific size how I can shrink tempdb log file when reaching a specific size?? I'm scheduling job to shrink tempdb but still I face a problem of disk space due to tempdb is full! Cloning a Non-Standard Svn Repository with Git-Svn I'm relatively new to Git, but I've found it so easy to work with at home that I'd like to use it at work where our projects are stored in Svn repositories. Unfortunately, the repositories are slightly non-standard and I'm having trouble getting them cloned. Sure, they all have trunk, branches/ and tags/, but branches/ and tags/ have subdirectories before hitting the real project directories:  trunk/ branches/maintenance/release1 branches/maintenance/release2 ... branches/development/feature1 branches/development/feature2 ... tags/build/build1 tags/build/build2 ... tags/release/release1 tags/release/release2   After cloning:  $ git svn clone -s --prefix=svn/ https://mydomain.com/svnproject $ git branch -r   development   development@1340   maintenance   maintenance@1340   tags/build   tags/build@1340   tags/release   tags/release@1340   trunk   trunk@1340    I get none of the actual project branches or tags. I actually need to be able to work on the trunk, one maintenance branch and one development branch. I've tried this approach in addition to several hacks at modifying the config, but nothing is working for me.  Is there any way I can get the key components of my non-standard Svn project into a local git repository so that I can easily move between them?  Many thanks.  UPDATE: I should add that I can't do a wholesale switch to Git (yet). There are other team members involved and an international presence. The logistics of the transition are more than I'm willing to undertake until I'm much more comfortable with Git; as I mentioned, I'm still pretty new. I've barely scratched the surface of its capabilities. Evaluation order of Button's action Strangely low reputation How is this possible that the user with  question only has that little reputation? I've checked his site and he doesn't have a lot of downvotes or bounties. Why are these sites cloning my content, and how do I stop them? So I was searching for one of my own websites on Google: http://www.botlibre.com  and to my surprise found some clones of my website, like:  http://83waystowasteyourtime.adidas.com  and:  http:// mediaiq.astral.comm  My question are:   Why are they creating clones of my website?  Some kind of SEO scheme or what? What gain could they be getting? How do they have a URL at adidas.com and astral.comm?  I assume it's not Adidas steeling my content. How do I shutdown these sites and stop people from stealing my content? (on Tomcat) invalid conversion from ‘const char*’ to ‘char’ How do I reset a lost administrative password? I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution? Dimension of a subset Avoiding IF ELSE due to variable been NULL Apache accepting requests to other servers? I'm having problems with apache server (CentOS VPS at Amazon). When apache starts, it starts to receive hundreds of requests, this is an example of the log:  173.208.216.165 - - [25/Jan/2015:18:23:11 +0000] "GET http://go.padstm.com/resources/img/iebt.png HTTP/1.0" 200 36023 "http://go.padstm.com/?id=173374&amp;t=iframe&amp;var=33110" "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)"   The path /resources/img/iebt.png is in my server, but not go.padstm.com. The strangest thing is that apache is accepting all the requests.  Other example: in this case, the entire resource is NOT in my server, but apache returns 200:  198.204.239.250 - - [25/Jan/2015:19:04:39 +0000] "GET http://fstads.com/show.php?z=26&amp;pl=494&amp;j=1&amp;code=1422237874120 HTTP/1.0" 200 10819 "http://financezhen.com/?p=186#respond" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre"   I don't know why these requests goes to my server, or why it returns 200...  Also, when apache starts and module prefork is enabled, it launches multiple httpd processes. If worker module is enabled, it launches multiple threads. Ok, but in both cases apache ends up consuming all the CPU and memory of the server, and there is not traffic directed to my server.  More info: ProxyRequests is Off. Also: I'm using ip-based vhosts:  NameVirtualHost xxx.xxx.xxx.xxx:80  &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName mydomain.com     ServerAlias www.mydomain.com     DocumentRoot /var/www/html/w3prod     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/w3prod.mydomain.com combined     ErrorLog /var/log/httpd/w3prod_error.mydomain.com &lt;/VirtualHost&gt; &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName picfarm.mydomain.com     ServerAlias www.picfarm.mydomain.com     DocumentRoot /var/www/html/picfarm     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/picfarm.mydomain.com combined     ErrorLog /var/log/httpd/picfarm_error.mydomain.com &lt;/VirtualHost&gt; &lt;VirtualHost xxx.xxx.xxx.xxx:80&gt;     ServerName test.mydomain.com     ServerAlias www.test.mydomain.com     DocumentRoot /var/www/html/engine-test     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/test.mydomain.com combined     ErrorLog  /var/log/httpd/test_error.mydomain.com     ProxyRequests Off     ProxyPreserveHost On     &lt;Proxy *&gt;             Order deny,allow             Allow from all     &lt;/Proxy&gt;     ProxyPass /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPassReverse /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPass / http://xxx.xxx.xxx.xxx:8080/     ProxyPassReverse / http://xxx.xxx.xxx.xxx:8080/ &lt;/VirtualHost&gt;   Any help would be appreciated. Thanks!