General :: Bash - Create Folders According To Date In System?

May 26, 2011

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?

View 2 Replies


ADVERTISEMENT

General :: Tab-Completion In Bash Indexing System Folders?

Nov 15, 2010

tab-completion indexes system folders (like /usr/bin, /usr/local/bin)! so say i'm in a folder that has two files, 'text' and 'myprog', i type in an 'm' then tab, and i get hundreds of results including 'mysql', 'mysqlconfig', and others as im sure you can imagine. is there a way to set it to default or something else that will only make it index the current folder?

i tried changing my PATH variable so i could execute programs in the current directory without './' - what i added to PATH was ':.' at the end (apparently this is not the way to do it... :S). i tried resetting PATH various times ('unset PATH', 'PATH=$whatever...') but this has not fixed the problem. using 'unset PATH', of course, removes everything from PATH, which meant that functions (like 'ls') in /usr/bin and /usr/local/bin can't be found. obviously i want those to be found, but i would rather not tab through them!

View 2 Replies View Related

General :: Use Date With Touch To Create New File With Date Based Name?

Mar 12, 2010

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

View 5 Replies View Related

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.

View 14 Replies View Related

General :: Copy All Files And Folders From Specific Date?

May 26, 2011

I wanna copy all folders and files created from 01.01.2011 until today to new placeie:cp -r /home/moviecar/public_html/wp-content/uploads/ /home/teaser/public_html/wp-content/uploads

View 4 Replies View Related

Ubuntu :: Create Folders In The File System?

Oct 15, 2010

Why am I trying to create folders in the file system you ask? I'm messing around with Drupal and I want to add some modules. So I need to go to the blablabla/sites/ folder and add an 'all' folder followed by a 'modules' folder.No problem, right? Wrong?It seems I don't have the rights to create folders in the file system ( which I only recently figured out is actually root. duh. )I've figured out that I was able to install all the LAMP parts because I was using 'sudo' before every command, which apparently grants me temporary rights to root? ( I think? )Sooo... what's the magic for creating folders and transferring files to my Drupal folder... which it seems requires root permissions?

View 9 Replies View Related

Ubuntu :: Create Folders In 9.10 File System

Nov 9, 2010

I have set up a dual boot system with Windows XP and Ubuntu 9.10. I have upgraded Ubuntu to the most current version available online. I'm unable to create folders or subfolders in the Linux file system. I have researched the manual and my Unbuntu Linux book and see that I should be able to click on 'File' from the menu, then 'Create Folder', and then input the new folder name, but the 'Create Folder' selection is 'grayed' out which I conclude means that it is set on inactive and unable to be used. I am able to access my Windows disk by mounting and then typing in my password, so I have Administrator privileges.

I'm able to create a new folder in Unbuntu Linux for my Windows (NTFS) files. When I installed Unbuntu, I did not see any options to have write access to the Ubuntu file system. I can create new files within the existing folders. Soon after working out my Linux problems, I will be using PHP/MySQL/Apache to do some important work, so I will need to be able to create new folders and subfolders in my Linux system. I have some urgent tasks I need to do away from my PC soon, so I will be a while before getting back to this.

View 1 Replies View Related

Ubuntu :: Cannot Create No Folders In Own File System

May 19, 2010

Based on Ubuntu 10.04 Lucid Lynx, Linux 2.6.32, Gnome 2.30 and Xorg 7.4, Linux Mint 9 "Isadora" features a lot of improvements and the latest software from the Open Source World. anyways, I just done a fresh install and I cannot create no folders in my own file system, anywhere? It must be permissions, because when I try in terminal I get permission errors. Also this is my first Linux install

View 5 Replies View Related

General :: Script To Create Directory With Date?

Dec 6, 2010

i need to create script to make directory with the current date example : the directory name is " 060122010,1100" or near to that format

View 3 Replies View Related

General :: Script To Create New Directory With Date

Apr 21, 2011

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?

View 3 Replies View Related

General :: BASH To Find Pics And Videos With No Date Taken Exit

Aug 7, 2011

Is there a script to do this? I have shotwell and want to find files that are going to cause problems with automatic sorting.

View 3 Replies View Related

General :: Bash: Find Folders With Less Than X Files?

Sep 18, 2010

How would I go about finding all the folders in a directory than contain less than x number of .flac files?

View 2 Replies View Related

General :: How To List Folders Using Bash Commands

Sep 14, 2011

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )

View 3 Replies View Related

General :: Bash Script To Categorize Folders On Similar Names?

Oct 10, 2010

Any script to categorize folders with similar name into one directory. For example: There are 4 directories named LinuxFedora, LinuxUbuntu, WindowsXP and Windows7. The script should be able to create two folder named Linux and Windows wheree respective directories are moved.

Next example: If there are many folder as below:
DevLys 010
DevLys 010

[code]...

View 1 Replies View Related

Ubuntu Multimedia :: Digikam - Renaming On Import - "Create Date" Versus "File Modification Date"

Jan 24, 2011

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?)

PS: I'm on Ubuntu 10.04LTS, using DigiKam 1.2.0

View 1 Replies View Related

General :: How To Know System Up-to-date

Nov 29, 2009

I have SLES 11 and activated the daily updates.

But i don't know if the system :dowloads the updates
if the downloaded updates are immidiately installed
some updates need to reboot the system. does it automatically reboot or
does he(the system) inform me ? (where ?)

View 2 Replies View Related

General :: How To Create Virtual Folders From Saved Search

Jan 14, 2011

I would like to have on unix-like platforms, the same functionality as to Windows 7 Library folders (aka virtual folders) you see in Windows Explorer.Gnome Nautilus do that kind of virtual folders through saved search. But I want a system-wide solution, not a gnome-wide solution.Is there a tool that creates virtual folders from the concatenation of multiple search queries (the result of multiple find commands ?). The solution should index files for better performances and you should be able to define the default folder for copy operations.

View 1 Replies View Related

General :: Make A Bash Script That Automatically Delete The Home Folders?

Feb 15, 2011

I am administrating a lab in a university and every semester we need to delete all the home folders of the accounts for the next semester. I would like to make a bash script that does this automatically and having trouble with it. Note that I am writing my very first bash script. What I need to do is make a script to delete the following:

Delete everything in /home/$exp$num/$dir
when "exp" could be either "rt", "ic" or "sp".
"num" could run from 1(single digit) to 45 and dir is "profile" and "work".

This is what I tried to write:

Code:

#!/bin/sh
cd /home
for exp in "rt ic sp"
do

[code]....

What seems to be the problem is the reading of "$exp$num" as a joint expression.

View 4 Replies View Related

General :: Best And Up To Date System To Install?

Mar 10, 2011

I want to try Linux on a 5yr old desktop, What is the best and up to date Linux to install.CPU-AMD Sempron(tn)3000+,CPU Speed-2000MHz/333MHz, Ram 1.5G

View 8 Replies View Related

General :: Always Create Files/folders But Only Write To Those The User Owns?

Aug 14, 2011

I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should only be able to edit the files they actually own.

View 1 Replies View Related

General :: BASH Script To Move Files/folders To Either The .Trash File Or To Another Direcotry?

Dec 2, 2010

I am looking for a script/advice or guidance on how to write a script so that when I use the 'del' command it removes/sends the files/folders to a I specify for example 'dustbin

View 13 Replies View Related

General :: Uptime - Getting Date & Time Of System Startup?

Mar 28, 2011

I know that uptime prints the time a machine has been up and running, but is there an easier (reliable) way to get the date of the start up than counting down from this output?I tried looking around /proc, but didn't find anything of relevance. There's also a line like this on my dmesg: [ 0.673492] rtc_cmos rtc_cmos: setting system clock to 2011-03-14 14:26:52 UTC (1300112812), but I'm wondering if this method is distribution and kernel version agnostic.

View 5 Replies View Related

General :: File Permission - User Can Create Files/folders In The Shared Folder

May 4, 2011

Is possible to make a folder permission like below?

-User can create files/folders in the shared folder.

-But the files/folders they created, cannot be delete/change by em.
(only can be delete by root users)

-Each new files/folders created will auto owner to root only.

View 4 Replies View Related

General :: Move To Previous System Date Using Command Line?

Sep 21, 2010

I want to know the command, so that i can move back two days i.e. all the changes i made during the two day is rolled back .

View 5 Replies View Related

General :: Create A Bash Script?

Jun 12, 2011

create a bash script with "if" statements and to do that I need to learn some bash programming. I will probably do it later but I want to create some script today so maybe The script should do this:

Code:
I enter something like this string with a script path:
$ ~/watch-script http://www.......com/watch?v=OI3gKGhe0QM

[code]...

View 5 Replies View Related

General :: Create A Shortcut In BASH?

Feb 23, 2010

I wanted to do this:

Code:

ssh root@10.10.10.10

How would I create a shortcut in BASH so that I can simply type:

Code:

mypc

I want to be able to execute commands like that; like you can with ls, cd, grep, etc. Do I create a BASH script and place it in /bin?

View 14 Replies View Related

General :: Create A Script That Will Look For A "filename" Under /etc/, Date Stamp The File And Copy It To /var/www/upload?

Jul 14, 2011

I'm trying to create a script that will look for a "filename" under /etc/, date stamp the file and copy it to /var/www/upload

View 5 Replies View Related

General :: Create GUI For Bash Script Using Kommander?

Jan 21, 2010

I have create some simple bash script file (.sh), and i would like to find out what are the steps that i should do so that the GUI form is able to call out and run the bash script file (e.g clicking the button on the form, and the script will run).

View 1 Replies View Related

Ubuntu :: Create A Bash Script To Create Make A Ftp Mirror Copy Of It

Aug 4, 2011

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?)

View 2 Replies View Related

Ubuntu :: Bash Command For Counting Down To A Certain Date

Jan 6, 2010

I would like to write a shell script that displays the number of days, hours and seconds left until a certain date and time. What commands would I use?

View 6 Replies View Related







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