04-22-2015
Find and Move files
I have the below command to delete all .xml files older than 90 days
find . -type f -name '*.xml' -mtime +90 -exec rm {} \;
What will be the command to move all the .xml files older than 90 days to this folder -> "/tmp/my_bk"
My OS: SunOS my-pc 5.10 Generic_150400-17 sun4v sparc SUNW,T5440
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello folks. I have read the forum here, almost came close to using some of the hints but too much info so I need a little nudge.
OBJECTIVE: I want to write a script that looks at certain type of files, than move those selected files to another directory, however, keeping the structure (PATH)... (4 Replies)
Discussion started by: saswerks
4 Replies
2. Shell Programming and Scripting
Using a bash script, I need to find all files in a folder "except" the newest file. Then I need to insert the contents of one text file into all the files found. This text needs to be placed at the beginning of each file and needs a blank line between it and the current contents of the file. Then I... (5 Replies)
Discussion started by: Trapper
5 Replies
3. Shell Programming and Scripting
i have some 1000 files in my dir and i want to find top 100 files and move them to some other location:
below the 2 commands i used, but it is not working
ls -ltr | grep ^- | head -100 | xargs mv destination - _________>not working
ls -ltr | grep ^- | head -100 | xargs mv {}... (3 Replies)
Discussion started by: ali560045
3 Replies
4. Shell Programming and Scripting
I need help with a bash script.
We have a directory of files which need to be renamed and moved to another directory based on filename information in a cvs file.
The contents of the cvs file are as follows:
A102345,abc123
A102347,dfg475
Where dfg475 is the basename without extension
Our... (8 Replies)
Discussion started by: Lloyd Boyette
8 Replies
5. Shell Programming and Scripting
Hi All,
So I have another question. I'm trying to search for files with a certain extension and then move all of them up one level in the folder hierarchy.
So something like this:
original: /path/to/file/test.txt
after: /path/to/test.txt
I had some great help recently with another... (4 Replies)
Discussion started by: ideal2545
4 Replies
6. Red Hat
Greetings....
Trying to find and move the 30 days old logs
#!/bin/bash
DATE=`date +%d-%b-%Y`
STATUSLOG="$HPATH$DATE-E3Backup.log"
HPATH="/ABC/Websphere/"
HT=`hostname`
BKUPSTR="/ABC/Websphere/$HT/"
echo "Moving of old logs Started on $HT " >> $STATUSLOG
find... (2 Replies)
Discussion started by: manju98458
2 Replies
7. Shell Programming and Scripting
Hi ,
I've learnt that the following command will remove the files from the given folder for given no.of days
find /home/etc -type f -atime -10 -exec rm -f {} \;
But how can I change the above command that will move the files to another specified directory instead of removing the... (1 Reply)
Discussion started by: smile689
1 Replies
8. Shell Programming and Scripting
I have have 6 empty directory below. I would like write bash scipt if any files less "1000000000" bytes then move to "/export/home/mytmp/final" folder first and any files greater than "1000000000" bytes then move to final1, final2, final3, final4, final4, final5 and that depend see how many files,... (6 Replies)
Discussion started by: dotran
6 Replies
9. UNIX for Dummies Questions & Answers
Greetings. I know enough Unix to be dangerous (!) and know that there is a clever way to do the following and it will save me about a day of agony (this time) and I will use it forever after! (many days of agony saved in the future)!
Basically
I need to find any image files (JPGs, PSDs etc)... (5 Replies)
Discussion started by: Clyde Lovett
5 Replies
10. Shell Programming and Scripting
I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
Discussion started by: cmccabe
7 Replies
Osmo(1) Osmo(1)
NAME
Osmo - a handy personal organizer
SYNTAX
osmo [option]
DESCRIPTION
Osmo is a handy personal organizer, which includes calendar, tasks manager, address book and notes modules. It was designed to be a small,
easy to use and good looking PIM tool to help to manage personal information.
OPTIONS
-c, --calendar
Show small calendar window
-e, --check
Check for events since last run
-d, --days
Number of days to check forward for events (default: 0)
-s, --config=PATH
Set absolute path for settings and data files
-?, --help
Output help information and exit.
FILES
$HOME/.osmo/calendar_notes.xml - calendar groups and notes
$HOME/.osmo/config.xml - configuration
$HOME/.osmo/contacts_records.xml - contacts data
$HOME/.osmo/ical_files.xml - active iCalendar files
$HOME/.osmo/notes_entries.xml - notes list
$HOME/.osmo/notes/*.osm - notes data files
$HOME/.osmo/tasks_entries.xml - tasks data
EXAMPLES
To run this program the standard way type:
osmo
To run small calendar type:
osmo -c
To check events for two days since today type:
osmo -e -d 2
HOMEPAGE
http://clayo.org/osmo
AUTHORS
Tomasz Maka <pasp@users.sourceforge.net> (programming)
Piotr Maka <silloz@users.sourceforge.net> (programming)
Maja Kocon (http://pinky-babble.org) (graphics)
CONTRIBUTORS
Markus Dahms <mad@automagically.de> (LibSyncML support)
Nacho Alonso Gonzalez <nacho.alonso.gonzalez@gmail.com> (Windows port)
Tomasz Maka <pasp@users.sourceforge.net> 0.2.12 Osmo(1)