General :: Create A Script That Will Simply Create A DIR With Date And Autorun Itself Every 24 Hours?
Jan 17, 2010
i am running into few problems with the script here. I have an FTP server, all configured, and i need to have a script that will create a folder with current dated within a tree as soon as particular user logs in. I was wondering if that is possible with proftpd. if not, can someone suggest how to create a script that will simply create a DIR with date and autorun itself every 24 hours? i am running Debian/Proftpd with Mysql authorization.
I am using CRON to create a new, blank file, every minute, in a specific location on my web server. After web searching, and reading man pages, I get the impression that the following command is supposed to work:touch /home/mydomain/var/folder/attachments/`date +%H%M`.txtThis should give me a new file with a file name that is the current hour and minute.However, when executed, the CRON mailer reports:touch /home/mydomain/var/folder/attachments/`date +/bin/sh: -c: line 0: unexpected EOF while looking for matching /bin/sh: -c: line 1: syntax error: unexpected end of fileSo, it looks like shell is seeing the plus (+) sign as an EOFObviously, nothing get created.What would be the easiest, single line command to create an empty file, at a given location, with a time based file name
I'm trying to write a script which will take mysqldump from a server and put it in a directory with today's date. Here's the script i've written so far:
Code: #!/bin/sh BACKUP=/data/backup/sql2/new_backup/daily cd $BACKUP mkdir `date '+%m%d%y'`
[Code]....
I want to put the mysql dump in the today's directory. How can i declare this?
Is there any other short/easier and smarter way to do the following in Linux? code...
I need to use crontab to create folders every day and every month inside /home/abcd/dammi, /home/abcd/harrami, /home/wxyz/dammi and /home/wxyz/harrami. Can anyone help me with this?
I WANT TO CREATE A Qt application / shell script, that simply updates my facebook status.perhaps this would be poosible but i don't know how to implelment this actually.
I just switched from a basic digital camera to a more advanced one that stores both Jpeg and Raw (.Nef - it's a Nikon) files for me.When importing files in Digikam, I rename the files so that they start with Date and Time. Example: 20110121-223748.JPG for a photo taken on Jan 21st 2011 at 22:37:48.I was a bit surprised when importing both the JPEG and the Raw version of the same photo, that the filename is different by a few seconds (no constant offset, sometimes they are the same):
20110121-223748.JPG 20110121-223750.NEF
I did some "research" by looking at the exif data of both files (using "exiftool 20110121-223748.JPG" from the command line). Here is what I got back
(amongst other data):20110121-223748.JPG File Modification Date/Time : 2011:01:21 22:37:48+01:00 Modify Date : 2011:01:21 22:37:48 Date/Time Original : 2011:01:21 22:37:48
[code]....
So it seems that Digikam is using the "File Modification Date/Time" (different in the Jpeg's and Raw's of my camera) rather than the "Create Date" (the same for both Jpeg and Raw). (The few seconds difference in "File Modification Date/Time" between the two versions of the same photo is probably due to the time that my camera needs to write away the data on the SD memory card. I guess.) Is there a way to have Digikam use the Create Date? (Or the Date/Time Original?)
I am currently working on a script which makes regular backups of some data I have, and I would like to name the compressed TAR files with the date it they were created, in short I want to rename a file:
I recently bought an host to have a personal website and would like to create a bash script to create make a mirror copy of it and then add it to crontab to run once a week. Essentially what I want to do is to get the website by using wget -m ftp://user***@ftp.host/mydir
Once this is done I'd like to have everything in an archive called mysite.date.tar.7z I've no experience at all of bash scripting but I guess this should be an easy task? How to make the user and password not visible ? Is there any other option better than wget? (maybe rsync it works better?)
I have a switch tray on my computer and I installed opensuse in one of the hard drives that I have but as I switch between the windows hard drive and opensuse the time changes all the time. For example it's 10pm right now and if I switch the hard drive to opensuse the time automatically gets adjusted 4 hours back and then I fix it and when I switch back to my windows hard drive the time goes forward 4 hours. I check both region settings and they are both set to NY Eastern time. Why is it doing this?
I bought a web hosting account(cPanel) and I want to create my own name server(ns1 and ns2.mydomain.com). So when I want to host addon domain, I can point them to my name server instead of hosting company name server.
EDIT: Whoops. Just realized that there is a Networking subforum. Apologies. In 10.04, I am able to get to the dialog in NM that asks for the network name and security for the creation of a new wireless network. However, the "Connect" button is grayed out and filling out all fields doesn't allow me to press it. I assume that this means that either there is a problem with my configuration or that my network card is not supported. Here is the lshw entry for my wireless card:
Code: *-network description: Wireless interface product: PRO/Wireless 4965 AG or AGN [Kedron] Network Connection vendor: Intel Corporation
[Code]...
EDIT2: Well, I was able to make an ad hoc connection via "Edit Connections" This seems to be a bug in the NetworkManager dialog.
I do have all basic programming knowledge, I know what to do when it comes to C,C++, Python ETC.So what I want to do is is make my own OS based off a linux kernal or anything else.But I dont know where exactly to start, ive read the whole LFS book already and yeah but like im still confused because im already dual booted with windows 7 and Ubuntu, so in order to start do I need to dump my HDD completely or do I only need to uninstall 1 OS out of 2 ?
Also if I want to do this using the LFS live CD as a host where do I start with that when beginning to write my own OS?
I need to create an rpm, to decrease time consuming in installations of minor packages. I googled many sites in which they are going theoretically(of course, it should be in that way).
I have a full series of a show in a box set....i need to make copies...and ive honestly never made a dvd myself...ive made plenty of cds....never a dvd...so i guess the question is...what applications do i need? should i rip the dvd onto my hard drive first? really not sure what i need to do...im using ubuntu 10.10 ive already installed gnomebaker...
I have some school work that involves creating a script that creates a backup of my /home folder, everything goes well but the problem is with the filename.
I am supposed to create a .tgz with the filename : hostname-day-date-HH:MM:ss.tgz
The .tgz gets created with the correct filename but when I try to unpack it the filename can't be resolved, it's the : that mess things up.
why I cant seem to create a dot file (a file that starts with a dot) in my /tmp folder even with root priviledges. I installed F-Prot for linux & when I try to do a scan it complains it "can't stat a file" it seems to want to create & quits. So I tried creating it my self but it wont create a file that starts with a dot it seems. I also tried "chmod go+rx /tmp/*"
This is the error
root@JASONS-BRAAIN:/opt/f-prot# /opt/f-prot/fpscan -l F-PROT Antivirus version 6.3.3.5015 (built: 2009-12-23T13-43-55) FRISK Software International (C) Copyright 1989-2009 Engine version: 4.5.1.85 Arguments: -l
I want to create rpm from tar.gz, what I want to know is,
1= download tar.gz 2= untar this tar.gz file 3= run ./configure command. 4= now I want to create rpm file to install my package via rpm so I can uninstall easy and redistribute this rpm to my friends.
(or I have to run "make" command also after step 3, then go to step 4 to create rpm) please help me with step by step commands, so I can create rpm with my own compiled options of package.
What is the best/easiest way to create a Linux Live CD? Specifically, I'd like to create a Live CD that is very minimal in size, runs XFCE4, Wireshark, and has hardware drivers that make it compatible with a wide variety of laptops, ethernet drivers, and 802.11 drivers.
It needs to have an up-to-date kernel and it needs to be relatively easy to update as newer kernels become available.By minimal in size, I mean would like to get my features in to less than 300MB. I only need 1 language (English) supported and 1 keyboard layout. I'm personally partial to Ubuntu.
i have to create 100 users in Linux with some password can it be done in one go i tried newuser command but the home directory is not created for those users.
plus when i login for the first time into a server i got EXECUTING /etc/profile ... EXECUTING .profile ... EXECUTING /xyz/abc/bin/setenv.ksh file ...
before the prompt. The above three lines shows that some kind of script was set to run when a user login for the first time that will create the home directory (if i am not guessing wrong)and never run if user login again.
I know this will sound stupid, but we've been tasked with standing up a professional Linux server to run a vendor tool and product on. And my team has never administered a Linux or Unix box before. I know the concepts, but can't find the tools!
How do I create a user-ID? And is there a GUI tool I can fire up from the command line to make some of this easier? We can get to the box, manipulate files, etc. But to this point we're exclusively usint 'root', and I know I need to stop that, and prevent that happening in the future.