General :: Cronjob Directory / Send An Email If Directory Contains More Than Ten Files?

Oct 13, 2010

I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.

All I have is this...

*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]

I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.

View 6 Replies


ADVERTISEMENT

General :: Send Automatic Email For Users When Files Added In Ftp Directory?

Oct 23, 2009

if it is possible to send automatic email for users when files added in ftp directory in linux

View 2 Replies View Related

CentOS 5 :: Check Directory For New Files And Send Email Alert

Sep 12, 2009

i have CentOS 5.2 based server running openssh, which gives sftp service to the outside users(from internet), the users from some public ip-addresses uploads and download files from sftp-server directories. I want that whenever a user uploads a new file in certain directory of server, the server should send me an email alert

View 1 Replies View Related

Debian :: Daemon - Send Email When Directory Change?

Dec 27, 2010

Would like to know how can I put a daemon on Debian 5 that can send e-mail when the content of a specific folder change, if not possible, at least how to send a daily e-mail with the content of a specific folder.

View 4 Replies View Related

General :: Make A Cronjob Who Makes A Tag.gz Of Everything Inside A Directory In A Recursive Way?

Mar 23, 2011

I would like to make a cronjob who makes a tag.gz of everything inside a directory in a recursive way. BUT there is a HUGE directory full of jpg's. I don't want this one in the backup.Additional points if it can backup symbolic links.

View 2 Replies View Related

General :: Perform A Long Directory Listing Of All Files In The /bin Directory That Have Exactly Three Characters In Their Name?

Jan 18, 2010

How do you perform a long directory listing of all files in the /bin directory that have exactly three characters in their name?

View 1 Replies View Related

General :: Files Created In A Directory Owned By Directory Group?

Jan 29, 2010

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?

View 2 Replies View Related

General :: Find Directory Older Than X And Mv Directory With Sub Files Command?

Jul 13, 2011

I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively

View 4 Replies View Related

General :: Symlink Each Of The Files In One Directory To Another Directory?

Feb 11, 2011

If I have a directory /foo with a few files in it, how do I symlink each entry in /foo into /bar/? For instance, if /foo has the files a, b and c, I want to create three symlinks:

/bar/a -> /foo/a
/bar/b -> /foo/b
/bar/c -> /foo/c

View 3 Replies View Related

Ubuntu :: Cronjob Results Filling Up / Directory?

Feb 22, 2011

Some of my cronjobs are filling up files in my / directory. How do I make this stop? One of my cron jobs uses wget:[URL].. The bexcb0.php file writes a file and then echos a result if it is sucsesfull. These echo results are being put into bexcb0.php files in my /root folder and are piling up.

My / folder is filling up with files bexcb0.php etc bexcb0.php bexcb0.php.1 bexcb0.php.2 bexcb0.php.3 bexcb0.php.4 bexcb0.php.5 etc How do I make this stop? If I just remove the echo will they stop writing to the / folder?

View 1 Replies View Related

Ubuntu :: Copying Files To A Directory And Skip The Files That Already Exist In The Directory?

Jun 30, 2011

How would i go about copying files to a directory, yet skip the files that already exist in the directory, and also remove the files that are in the directory. For example:

Code:

$ls /dir1
img001.jpg
img002.jpg

[code]....

Now i would like to copy from dir1 to dir2, but the contents of dir2 would be:

Code:

$ls /dir2
img003.jpg

View 7 Replies View Related

Ubuntu :: Access Files That Existed In Directory Before Mount Partition To Directory?

Feb 21, 2010

Recently I mounted a larger partition into my home directory since I was running out of space, Everything went smoothly, but it caused me to wonder about something I cant figure out. While playing with the mount unmount commands when I was copying everything over... before editing my fstab.

Is there a way to access the files that existed in a directory before you mount a partition to that directory? after mount the original files are gone.unmount and they are back, Where do they go?

View 3 Replies View Related

Fedora :: Copy A Few Files From Windows Directory Into The Wine Directory

Aug 1, 2009

i want to copy a few files from my windows directory into the wine directory - its no big deal, just a few preference files so i dont have to set something up all over again. trouble is, i had the files copied, but i cant find the wine/ c: drive directory anywhere, anyone know where this can be found??

View 8 Replies View Related

Software :: List Files/directory Names Without Directory Contents?

May 3, 2011

When I run "ls -al somedir*" (I use the "ll" shortcut, actually), Linux not only list files that match, but also the contents of directories whose name also happens to match.Is there a way to limit "ls" so that it will only show names (files and directories) and ignore the contents of the directories?

View 2 Replies View Related

Programming :: Copy Files After Search In Array From This Directory To Another Directory?

Jan 3, 2009

After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).

View 4 Replies View Related

General :: Can't Copy Files From Directory With "&" Symbol In Directory Name

Mar 18, 2010

I am using my media server as my podcast collector. I am in the process of learning the ins and outs of NFS so i can mount a NFS directory and transfer my podcasts from server to player. For now i am using scp to transfer podcasts from server to desktop then to player. The problem is the path to the directory of one of the podcasts is /home/user/gpodder-downloads/The BILL&TIMMY Show Podcast.

whenever i try and run my scp command it fails because it thinks that TIMMY is a script i want to run in the background. I have tried to back-slash escape the character, i've tried single quoting and double quoting the character and i still get the same problem. as it sits now i have to move all podcasts to another directory and then transfer them to my desktop...but i would like to transfer the podcasts without un-necessary steps.

View 8 Replies View Related

Programming :: Deleted Files In Directory With So Many Files Without Deleting Directory Itself

Nov 14, 2010

There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.

View 3 Replies View Related

Ubuntu :: Remove Files From Directory A If Their Name Appears In Directory B?

Jul 7, 2010

I have two questions:How do I remove files from Directory A if their name appears in Directory B?How do I move foo.jpg and bar.jpg from Directory C to Directory D if and only if foo.png and bar.png appear in Directory D?I suspect there's probably a bash one-liner for this, but...I can't come up with it.

View 5 Replies View Related

Server :: Can't Write Files To A Sub-directory Of The Chroot Directory

Jul 20, 2011

I'm using OpenSSH 5.5p1 on Fedora 15. I'm trying to get a chrootDirectory to work. Specifically trying to figure out why I can't write files to a sub-directory of the chroot directory. I created a user test_user and created a group called sftp. I added test_user to the sftp group. I edited /etc/ssh/sshd_config as follows:

Code:

Subsystem sftp internal-sftp
Match group sftp
ChrootDirectory /home/sftp_users/%u
X11Forwarding no

[code]....

View 1 Replies View Related

General :: Copy Files From Directory Of One User To Directory Of Another User?

Apr 15, 2011

Is it possible to copy files from directory of one user to directory of another user in linux?

View 7 Replies View Related

Server :: UShare - Directory Recursion And Symbolic Links / "drill Down" Directory Structure To List Files?

Jan 22, 2010

I have uShare 1.1a setup to talk to my XBox 360. If I share a directory that has no subdirectories, the video files display on the XBox. However, most of my files are in sub-directories on a different partition - I don't really want to copy them to the share, but uShare doesn't seem to recognise any sub-directories or files contained therein.

I have tried setting up symbolic soft links directly to the video files (although this is a pain, it is better than moving the files)...

Code:
ln -s /home/jonftp/TV-Shows/Buffy/Season-1/Buffy-101.avi /home/share/Buffy-101.avi
...but these don't show up on the XBox either.

How can I get uShare to "drill down" the directory structure to list the files or how can I get uShare to follow symbolic links?

View 2 Replies View Related

General :: Command Based Email Client To Send Email Through Secure Smtp?

Jul 26, 2010

In my Windows environment, I use email client such as Microsoft Outlook to connect to our email server to send email with the following configuration:

Incoming server (POP3): 995 - (requires with SSL)
Outgoing server (SMTP): 465 - (use encrypted connection SSL)

[code]....

And the mail server requires user ID login and password.how do I setup a text command based email client in my Linux (Centos 5.1) to send out email through the existing email server above, which is in another machine? The email client has to be text command based because I need to use command line to send notification email from anothar application installed in my Linux (Centos 5.1) Since the email client will only be used to send email notification, I don't require setting up of an email server in my linux.

View 2 Replies View Related

General :: Use Mkdir Command To Create 'local' Directory In /usr - There Are Error - Cannot Make Directory

Jun 16, 2010

I am a student studying computer science course.

Well, I am facing problem when doing lab questions.

I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).

I am required to use the /usr/local directory.

In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".

Look at my screenshot at [url].

View 9 Replies View Related

General :: Link A Directory In Ubuntu To A Directory In Windows 7?

Apr 12, 2010

I've just installed Ubuntu 10.04, trying out linux for the first time. I'm wondering if it's possible to link my documents folder in Ubuntu to my documents folder in Windows, so that when I open the folder in Ubuntu, I am linked to the folder in Windows.

View 1 Replies View Related

General :: Mount One Directory To Another While Mapping The Original Directory's UID To Another

Aug 23, 2011

I'd like to mount the directory /var/www/mysite to the directory /home/daniel/mysite, but also have the user of the mounted files mapped from the original user (www-data) to my own user (daniel). So that the file /var/www/mysite/index.php who's user is www-data will appear in the mounted directory as /home/daniel/mysite/index.php and be owned by daniel - and alternatively, if I create a file /home/daniel/mysite/test.php with my own user, it will be created in the original directory under the user www-data Is it possible? If not, what alternatives do I have so I can use an IDE and still make sure all the files belong to the HTTP server's user?

View 2 Replies View Related

General :: Create A Directory Named Like His Parent Directory

May 26, 2011

I need to create a directory named just like his parent.

Example:

I tried this but because there is "Space Characters" in the name of Parent directory, my script fails.

View 8 Replies View Related

General :: Using Cp Properly - Copy A Directory Somewhere Else Into This Current Directory ?

May 13, 2011

I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.

Code:

That is what it shows in the man pages, but when I do that, it says cp: no match

View 5 Replies View Related

General :: Auto Mount More Than Directory In The Same Directory ?

Apr 7, 2010

How can i auto mount more than directory in the same directory ? i want to automount 2 home directories in the /home and still be able to enter the other home directories !

The problem that i've another account on the system with home directory joe when the user1 home directory auto mounted i become unable to enter joe home directory !

View 1 Replies View Related

General :: Changes Directory To The Previous Working Directory?

May 15, 2011

Just a simple question

Code:
$ cat -
do in the Bash? I know 'cd -' changes directory to the previous working directory, but 'cat - ' does not seem to do the same thing.

View 3 Replies View Related

General :: Access Directory Outside Of Home Directory?

Apr 13, 2010

I'm using Mac OS X's Terminal.app shell to compile and run Fortran programs. One such program resides outside of my home directory (it is in the Applications folder, which resides on my hard drive but seems to be outside of my home folder). How can I navigate into this directory using Terminal.app to run the programs that reside there?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved