Sponsored Content
Top Forums Shell Programming and Scripting How to add decimal month to some month in sql, php, perl, bash, sh? Post 302904104 by Scrutinizer on Monday 2nd of June 2014 07:55:55 AM
Old 06-02-2014
Welcome to the forums. Is this homework?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Script : Split given month into weeks

I want to split a given month into weeks. For example if I give the date in dd/mm/yy format say 01/02/08 it should give output in the given format : week1 : start date and end date. week2 : "" week3 : "" week4 : "" (5 Replies)
Discussion started by: khushbu_roy
5 Replies

2. Shell Programming and Scripting

Isolating the Month in Perl

munt=`date '+%m` will isolate the month in digit form 02 = Feb Trying to get the same out of perl just cant see it $stimx = localtime($^T); print ((split/ /,$stimx)); (4 Replies)
Discussion started by: popeye
4 Replies

3. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

4. Shell Programming and Scripting

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

5. Shell Programming and Scripting

perl : searching for month and storing the date and time in an array

I am writing the code in perl. I have an array in perl and each variable in the array contains the data in the below format Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Discussion started by: giridhar276
5 Replies

6. Shell Programming and Scripting

Convert From Month Number to Month Name

Hi, I have a script that accepts an input date from the user in yyyy-mm-dd format. I need to get the mm-dd part and convert it to month name. example: 2011-11-15 I want that to become "Nov 15" I don't have the GNU date, I am using an AIX os. Thanks. (1 Reply)
Discussion started by: erin00
1 Replies

7. Shell Programming and Scripting

Need last month files after 10th of every month

Hi, I need all file names in a folder which has date >= 10th of last month, Example : files in folder AUTO_F1_20140610.TXT BUTO_F1_20140616.TXT CUTO_F1_20140603.TXT FA_AUTO_06012014.TXT LA_AUTO_06112014.TXT MA_AUTO_06212014.TXT ZA_AUTO_06232014.TXT Output: AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies

8. UNIX for Advanced & Expert Users

To pass one month range in sql script

Hi Guys, i am having .sql script which inserts data from one table to another table based on date condition, i need to pass range on based on how many number of months, for e.g set timing on; whenever sqlerror exit failure; spool myscript.log append accept start_date... (7 Replies)
Discussion started by: rohit_shinez
7 Replies

9. Shell Programming and Scripting

Remove new line and convert Month to Decimal

# Sample input common-name www.test.com.au expiration Dec 21 01:00:31 2017 GMT common-name www.test1.com.au expiration Jan 19 04:41:03 2018 GMT # Desired Output # Field 1: Domain name # Field 2: Date/time converted to Austraian format DD/MM/YYYY and on the same line as Domain Name. #... (7 Replies)
Discussion started by: thangbom
7 Replies

10. Linux

Bash Display First Friday of the next month

Hello, I need to find the date of next first Friday of the month and set as a variable in a bash script ie - FIRSTFRIDAY=$(date -dfirst-friday +%d) I know date -dfirst-friday doesn't work, but unsure if I can use this / cal + awk or something else to find the right date of the... (7 Replies)
Discussion started by: summerdays
7 Replies
FSARCHIVER(8)						      System Manager's Manual						     FSARCHIVER(8)

NAME
fsarchiver - filesystem archiver DESCRIPTION
fsarchiver is a system tool that allows you to save the contents of a filesystem to a compressed archive file. The file-system can be restored on a partition which has a different size and it can be restored on a different file-system. Unlike tar/dar, FSArchiver also cre- ates the filesystem when it extracts the data to partitions. Everything is checksummed in the archive in order to protect the data. If the archive is corrupt, you just lose the current file, not the whole archive. LINKS
Official project homepage: http://www.fsarchiver.org Quick Start Guide: http://www.fsarchiver.org/QuickStart Forums where to ask questions: http://www.fsarchiver.org/forums/ Report a bug: http://www.fsarchiver.org/forums/viewforum.php?f=17 SYNOPSIS
fsarchiver [ options ] savefs archive filesystem ... fsarchiver [ options ] restfs archive id=n,dest=filesystem[,mkfs=fstype] ... fsarchiver [ options ] savedir archive directory ... fsarchiver [ options ] restdir archive destination fsarchiver [ options ] archinfo archive fsarchiver [ options ] probe [detailed] COMMANDS
savefs Save filesystems to archive. restfs Restore filesystems from archive. This overwrites the existing data on filesystems. Zero-based index n indicates the part of the archive to restore. Optionally, a filesystem may be converted to fstype. savedir Save directories to archive (similar to a compressed tarball). restdir Restore data from archive which is not based on a filesystem to destination. archinfo Show information about an existing archive file and its contents. probe Show list of filesystems detected on the disks. OPTIONS
-h, --help Show help and information about how to use fsarchiver with examples. -V, --version Show program version and exit. -v, --verbose Verbose mode (can be used several times to increase the level of details). The details will be printed to the console. -o, --overwrite Overwrite the archive if it already exists instead of failing. -d, --debug Debug mode (can be used several times to increase the level of details). The details will be written in /var/log/fsarchiver.log. -A, --allow-rw-mounted Allow to save a filesystem which is mounted in read-write (live backup). By default fsarchiver fails with an error if the partition if mounted in read-write mode which allows modifications to be done on the filesystem during the backup. Modifications can drive to inconsistencies in the backup. Using lvm snapshots is the recommended way to make backups since it will provide consistency, but it is only available for filesystems which are on LVM logical-volumes. -a, --allow-no-acl-xattr Allow to run savefs when partition is mounted without the acl/xattr options. By default fsarchiver fails with an error if the par- tition is mounted in such a way that the ACL and Extended-Attributes are not readable. These attributes would not be saved and then such attributes could be lost. If you know what you don't need ACL and Extended-Attributes to be preserved then it's safe to run fsarchiver with that option. -e pattern, --exclude=pattern Exclude files and directories that match that pattern. The pattern can contains shell asterisks such as * and ?, and the pattern may be either a simple file/dir name or an absolute file/dir path. You must use quotes around the pattern each time you use wildcards, else it would be interpreted by the shell. The wildcards must be interpreted by fsarchiver. See examples below for more details about this option. -L label, --label=label Set the label of the archive: it's just a comment about the contents. It can be used to remember a particular thing about the ar- chive or the state of the filesystem for instance. -z level, --compress=level Valid compression levels are between 1 (very fast) and 9 (very good). The memory requirement increases a lot with the best compres- sion levels, and it's multiplied by the number of compression threads (option -j). Level 9 is considered as an extreme compression level and requires an huge amount of memory to run. For more details please read this page: http://www.fsarchiver.org/Compression -s mbsize, --split=mbsize Split the archive into several files of mbsize megabytes each. -j count, --jobs=count Create more than one compression thread. Useful on multi-core CPUs. By default fsarchiver will only use one compression thread (-j 1) and then only one logical processor will be used for compression. You should use that option if you have a multi-core CPU or more than one physical CPU on your computer. The typical way to use this option is to specify the number of logical processors available so that all the processing power is used to compress the archive very quickly. You may also want to use all the logical processors but one for that task so that the system stays responsive for other applications. -c password, --cryptpass=password Encrypt/decrypt data in archive. Password length: 6 to 64 chars. You can either provide a real password or a dash ("-c -") with this option if you do not want to provide the password in the command line and you want to be prompted for a password in the termi- nal instead. EXAMPLES
save only one filesystem (/dev/sda1) to an archive: fsarchiver savefs /data/myarchive1.fsa /dev/sda1 save two filesystems (/dev/sda1 and /dev/sdb1) to an archive: fsarchiver savefs /data/myarchive2.fsa /dev/sda1 /dev/sdb1 restore the first filesystem from an archive (first = number 0): fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1 restore the second filesystem from an archive (second = number 1): fsarchiver restfs /data/myarchive2.fsa id=1,dest=/dev/sdb1 restore two filesystems from an archive (number 0 and 1): fsarchiver restfs /data/arch2.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1 restore a filesystem from an archive and convert it to reiserfs: fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reiserfs save the contents of /usr/src/linux to an archive (similar to tar): fsarchiver savedir /data/linux-sources.fsa /usr/src/linux save a /dev/sda1 to an archive split into volumes of 680MB: fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1 save a filesystem and exclude all files/dirs called 'pagefile.*' fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*' exclude 'share' in both '/usr/share' and '/usr/local/share': fsarchiver savefs /data/myarchive.fsa --exclude=share absolute exclude valid for '/usr/share' but not '/usr/local/share' fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share save a filesystem (/dev/sda1) to an encrypted archive: fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1 extract an archive made of simple files to /tmp/extract: fsarchiver restdir /data/linux-sources.fsa /tmp/extract show information about an archive and its file systems: fsarchiver archinfo /data/myarchive2.fsa WARNING
fsarchiver is still in development, don't use it for critical data yet. AUTHOR
fsarchiver was written by Francois Dupoux. It is released under the GPL2 (GNU General Public License version 2). This manpage was written by Ilya Barygin and Francois Dupoux. 30 December 2009 FSARCHIVER(8)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy