LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-24-2007, 09:30 PM   #1
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
files back-ups


You know how Linux makes a back-up file every time a file is edited, is there a way to have that file saved to a specified folder instead of it always being saved in the original file's directory?

I'm using KDE if that matters...
 
Old 07-25-2007, 02:27 AM   #2
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
It doesn't so much matter that you are using kde, as it does matter which program you are using. If you are using kwrite, then no, I don't think so. On the bright side, if you are just trying to avoid the clutter, there is something you can do with kwrite: Settings-> configure editor-> Open/Save-> Prefix = .
If the Prefix setting is comprised of a single period, then every temporary save file will have a period added to the front of it. In unix (and linux) this will make it a hidden file. The file will still be there, but you wont normally be able to see it.
 
Old 07-25-2007, 06:05 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Why would you want to that? I would think that right there near the original is where it would be most useful. -- It's not that it's some kind of versioning control. One problem w/ putting them all in the same dir. is name space collision.

Last edited by archtoad6; 09-23-2007 at 04:33 PM. Reason: missing word -- "that"
 
Old 07-25-2007, 03:51 PM   #4
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Ok thanks, I was using Kedit to edit html files, and I didn't want a ton of back-ups floating around with the originals.
 
Old 07-26-2007, 12:05 PM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Were you getting more than 1 backup per edited file?
 
Old 07-27-2007, 06:56 PM   #6
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Nope, just 1 back up per original
 
Old 07-28-2007, 09:02 AM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
So the annoying "ton of back-ups" was large only because of the number of files edited.

If it's that important you could (& we could help you) write a script to delete the back-ups, it could even be set to leave newer ones. You could also put it in as a cron job.

Instead of deleting, you could just move them to a back-ups sub-dir.
 
Old 07-28-2007, 06:02 PM   #8
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by archtoad6
So the annoying "ton of back-ups" was large only because of the number of files edited.

If it's that important you could (& we could help you) write a script to delete the back-ups, it could even be set to leave newer ones. You could also put it in as a cron job.

Instead of deleting, you could just move them to a back-ups sub-dir.
Putting them in a back-up subdirectory is what I was hoping to do.
 
Old 07-30-2007, 08:55 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Do you need help writing the script?
 
Old 07-30-2007, 02:51 PM   #10
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
I've never tried writing a script before.
 
Old 07-31-2007, 07:23 AM   #11
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Would you like to try?

It's little more than putting the necessary commands in a file.
 
Old 08-01-2007, 09:15 PM   #12
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
sure always up for learning something new in Linux
 
Old 08-02-2007, 11:30 AM   #13
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Planning 1st.

Where will the script live? Will it operate only in its own dir., or will it be put someplace like /usr/local/bin?

Will it have to check for &/or make the necessary sub-dir, or can it count on that being provided?

Will it move all back up files, of only older ones?

How will it recognize back up files?


Just Start Writing

Almost self-explanatory -- what commands wold you issue on the CLI to accomplish your goal?


I suggest you try writing & posting (here, of course) the code, keeping in mind my planning Q's as well as any ideas I have overlooked. Please use LQ "Code:" blocks.

BTW, this is one of my ideas of fun.
 
Old 09-23-2007, 04:34 PM   #14
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Have you lost interest?
 
Old 10-04-2007, 07:55 PM   #15
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by archtoad6 View Post
Have you lost interest?
Sorry for the very delayed reply. I no longer need a script for that particular need, but perhaps learning now would be useful in the future.

Is a script file just a txt file with commands in it? And what makes it executable?

I'm assuming it's not as simple as
Code:
cd /home/replica/webpages
rm *.html~
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Back Ups???? raffytaffy Linux - Software 1 03-15-2006 10:08 AM
apc Back-ups a10392 Debian 1 12-03-2004 10:24 AM
Back ups vswr31 Linux - General 2 10-25-2004 12:56 AM
trouble using dd for remote back ups Jason Foat Linux - Networking 1 05-21-2002 02:05 PM
Trouble using dd for remote back ups Jason Foat Linux - Newbie 0 05-21-2002 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration