OpenSUSE Network :: Move Files After N Days?
Sep 24, 2010
I have a script that moves files after 60 days from the FTP folder over to a trash folder which is not accessible by the FTP. From there I can delete the files whenever the drive get's full. That works fine so far.
The only thing that bothers me is that files moved to ".Trash" are not in any folder structure anymore (one big directory with the deleted files in it).
When I do a "ls -la" on the array {} I see the file names including the folders. I'm not sure if the find command or the mv command forgets about the directories.
This is the script: bash -c 'date;find /Volumes/data1/test/ -mtime +60 -type f -exec mv {} /Volumes/data1/.Trash/ ;;date' >> ~/mylog
View 2 Replies
ADVERTISEMENT
May 12, 2011
I need to move files to a backup drive if they are over 30 days old. All I could find, when looking for scripts, were ways to sort files by date and the solutions were all over the place and nothing seemed simple or good.
I've thought of building my own running "ls -al > filelist.txt" type of approach and then processing the file, but not sure that is best way. An array would be much easier and eliminate the file, but never done an array in bash.
View 9 Replies
View Related
Jan 22, 2010
I`m totally new to linux, in fact I`m a windows adminscenario:I need to run a script that will automatically move 30 days old files from particular folder to a particular folder.
View 3 Replies
View Related
Nov 11, 2010
I would like to move some files between two machines and as scp sometimes is not the easiest thing to do. Do you know if there is any gui that makes this remote copy files procedure easier?
View 4 Replies
View Related
Jun 23, 2011
If I do this, there will be two computers I'd like to hook up to the one satellite modem (mine and my moms). What would be best to use, a router or a splitter or...? Will it be very difficult to setup in opensuse 11.3? Any thoughts on the ease of this whole idea? (The area I live in has no cable, no DSL and even cellphone service is so limited I have to walk around in 4 acres to find a spot to get a signal, hence my wanting to move to satellite internet).
View 1 Replies
View Related
Aug 13, 2011
I am runnig WinXP and OpenSUSE 11.4 on dual boot.Generaly i am using SUSE, XP only for UpNP Media Center(server) to watch movies stored on my computer on TV via STB.For this i am using TVersity for wich i not found yet Linux alternative - or better say - i found it but is too heavy for my PC(P4 1.6 Mhz, 768 MB RAM, an dinosaur from Nvidia Vanta with 64 MB RAM)But this is not a part of my question.My question is how to transfer(copy, move...?) files from SUSE to WinXP?A large files like avi, mkv, mostly movies.I solved this to copy them on USB and then from USB to Win.This is a very slow proces because my PC have only USB 1.0And before asked me - all files are legaly downloaded from paysites.From SUSE, partitions(disks), folders and files under WinXP are visible but is not possible to copy files on them - acces is denied.Is there any way to do this?Suse is insatlled on LVM - /root/home/swapI am interesting ONLY to copy files from SUSE to Win, not at al from Win to SUSE.Code:
Directory: /home/janez
Sun Aug 14 07:53:26 CEST 2011
janez@linux-cia6:~> su - root
[code]...
View 5 Replies
View Related
May 6, 2011
I have searched for a way to copy file less than X days old and I found this:http://www.howtogeek.com/howto/ubunt...days-on-linux/ The syntax for deleting files less than 7 days old would be like this:find /path/to/files* -mtime -7 -exec rm {} ;I would like to copy the files to mntas, and I'm not sure what the syntax should be.ould this work?find /path/to/files* -mtime -7 -exec cp {} mnt
as ;
View 3 Replies
View Related
Apr 19, 2010
i am a newbie in linux ,i am writing a bash script to identify the files which are exactly 7 days ( a week old) i tried this command find /var/backup -mtime +7 -exec ls -d {} ;but this gives me even the files which are older than 7 days
[root@proxy access]# find . -mtime +7 -exec ls -d {} ;
./access.log.1.gz
./access.log.2.gz
[code]...
View 3 Replies
View Related
Jan 3, 2011
I am new to unix, I am looking for a script to delete files older than 7 days but i also want to exclude certain directories (like arch,log .....) and also some files with extensions ike .ksh, .ch, ..............) in directories and sub directories
View 4 Replies
View Related
Jan 6, 2011
I am trying to put together ksh shell and I am new with writing scripts.How do you write a command to delete any files if it's 30 days old and also it's not currently being locked?
View 10 Replies
View Related
Sep 18, 2009
find -type f /path/* -mtime +7 -exec rm {} ;Is this the best way to delete only files (not directories) within /path that are older than 7 days? or is there a better way?
View 3 Replies
View Related
Jan 26, 2010
I've been trying to delete all files older than 7 days in a directory temp1.I have try different ways but nothing happend:
find /temp1/* -mtime +7 -exec rm rf
find . -mtime +7 -exec rm rf
find /temp1/* -mtime +7 -print -exec rm{}
View 13 Replies
View Related
Apr 23, 2011
I want to capture a mms stream daily. All works well with that, but I also want to delete any mpg files that are captured from the stream that are more than 7 days old. Will this command work?
Code:
#!/bin/bash
find /mnt/tera/all_video/thai3 -ctime +7 -name "*.mpg" -exec rm -f {} ; -ls > /var/log/thai3.log 2>&1
[code]....
View 2 Replies
View Related
Jun 3, 2009
Can anybody tell me how I can synchronise files between two computers in a network that have been modified or created within the last 60 days?
View 3 Replies
View Related
May 14, 2010
Command to find all of the files which have been accessed within the last 30 days?
View 1 Replies
View Related
Apr 12, 2010
I have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .
archive all files to one single file in every 30 days , and then remove these old files .
View 9 Replies
View Related
Jan 7, 2010
I upgraded to Mythbuntu 9.10 from 8.10 and things went fairly well. No major problems during the upgrade. The system is just a mythbackend server. The only things that access it are for myth and for the smb mounts for mythtv. Every couple days, the system stops responding to network traffic. No myth connection, no smb, no pings even. All I have to do is wiggle the mouse on the system and everything comes back up instantly. I noticed that after it comes back up, the time is off by hours.
View 1 Replies
View Related
Nov 3, 2010
I want to itemize addition for each type of transactions. The example below is for 3 days,10/13/2010, 10/14/2010, & 10/15/2010.
PROD =89.25+89.25+104.47= 282.97
TAX =9.37+9.37+10.37 = 29.71
ETAX = 1+1+1 = 3
[code]...
View 8 Replies
View Related
Dec 3, 2010
Seem my rotation part is not removing files older than 90 days. Anybody know what is wrong?
Code:
#!/bin/sh
#navigate to the desired backup location
cd /public/backup/linux
#dump the MySQL entirely, output file is dated
mysqldump -u root -pmt1jxz68f2 --all-databases > "`date +%Y%m%d`.sql"
#backup the web folder
[Code]...
View 1 Replies
View Related
Jul 6, 2010
I'm trying to truncate a postfix Maildata directory for one of our users. I want to be able to move any files older than <n> days to a new location, but also copying the relevant directory structure. This should be doable in the one comman. I've used find to locate the files, and mv to move them, but I can't figure out how to build the directoryt structure on the fly in the new location.
This is what I have so far:
Code:
find /Maildata/editor -mtime +42 -type f -exec mv -v {} /EditorEmailOld/ ; > ~/editor.txt
View 4 Replies
View Related
Sep 27, 2010
Can I delete files in trash that is older than 10 days with a terminal command?
View 3 Replies
View Related
Jul 26, 2011
I have set up a simple find and delete script for files older than X days. The problem is that some of the files that are send in this share are transfered from an archive server and creation/modified date remains the same when copied and the age of them could be a year ago or older and they get deleted over night by the script.For performance reasons the raid is mounted with noatime in fstab.Do you see any solution to this problem except enabling atime?I'm thinking at some more advanced script that writes the list of added files once a day and marks them for deletion after some time.
View 2 Replies
View Related
Dec 31, 2009
I have four PCs in my house that are running opensuse 11.2 and I want to create a home network to share files, scanner and printer.
View 4 Replies
View Related
Feb 22, 2011
i have 3 comps(running suse 11.3) and a laptop(running vista sp2). i have installed samba on all suse comps. i have a printer attached to one of the comps and it has been shared also the internet connection on that comp has been shared. all the computers are connected using lan cables through an ethernet switch. i also have a wireless router which is connected to the ethernet switch.
I am able to view all the comps on the network except the laptop running vista. all the desktops are visible on the network and are able to print and share files on the network and also connect to the internet. the laptop running vista can connect to the internet but its not visible on the network and nor can it share files across the network or access the printer.
View 1 Replies
View Related
Aug 25, 2009
How can you create a script to move or copy files from a main directory into multiple directories below the main directory.
View 7 Replies
View Related
May 7, 2011
1. Every Sunday2. Find all files older than 1 day3. Gzip these file4. Tar up the gzipped files into one tar file.5. Name the tarball with a date stamp indicating what day it was created, so we know that week's files are in the file
View 3 Replies
View Related
Jun 29, 2011
I am facing issue GNOME desktop I just installed Opensuse 2 days ago, I can not see desktop properly I did nothing. Basically I can not see close option and all folders goes to top.
View 6 Replies
View Related
Jul 22, 2010
As a "computer expert" providing assistance to my friends, I always find myself asking "what did you do?" and the reply is often "Nothing! The thing just stopped working". I'm having this kind of experience with myself right now. My SB0570/CA0106 setup that has worked in lots of Suse releases stopped working. It is silent. I dualboot with windows 7 and there the sound works IF I turn off the computer so that the soundcard can reset itself after using OpenSuse. Otherwise, Windows is silent too.
I installed the glibc pathes for 11.3. I have downgraded them and rebooted: No change so that's probably not it. Otherwise no changes where made to that OS that I'm aware of. I ran alsa-info and uploaded it here : [URL].
I have tried speaker-test -Dplug:front -c2 -l5 -twav
No error messages and no sound. I have tried it from the console without kde so that is not it. What would be the best way to completely reset sound configuration and start over? I had sound working on 11.3 two days ago.
View 4 Replies
View Related
Aug 18, 2009
Being relatively new both to Linux and this forum, i am sorry if i make a post that already is, evn though i couldn`t find it.My problem is i can`t move downloaded files over to root filesystem, i have downloaded and unpacked them to files. to change it`s looks and downloaded a skin, i open root, go to usr---> amsn ---> share --> skins, now i am to copy the file of the skin over to the root directory, butI also tried alt+f2, writing sudo conqueror, as an advice i got, but there was noe difference.
View 14 Replies
View Related
Dec 17, 2009
what I got - from a crontab run a script (understand that part), this script needs to count the amount of files in /outgoing/, then take 30 less that number, and move that many files from /readycalls/. I need to keep the asterisk outgoing que full of .call files with out having to many in there at any given time.
View 3 Replies
View Related