04-01-2004
when you enter the command mode, you can also use w option to write into the file, and vi could automaticly save it.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
im using allot with the method of getting file list from misc place in unix and copy them into text file
and then doing misc action on this list of files using
foreach f (`cat file_list.txt`)
do something with $f
end
can I replace this file_list.txt with some place in memory? ... (1 Reply)
Discussion started by: umen
1 Replies
2. Solaris
Hi all,
I would like to know how to save files in /tmp...
I was interested in knowing this because when ever i booted into solaris there would already be a few files present in /tmp.however any file that is freshly stored in would be lost on reboot...
can anyone answer this pls!! (3 Replies)
Discussion started by: wrapster
3 Replies
3. Shell Programming and Scripting
I have two files:
file-gene_families.txt that contains 30,000 rows of 30 columns. Column 1 is the ID column and contains the
Col1 Col2 Col3 ...
One gene-encoded CBPs ABC 111 ...
One gene-encoded CBPs ABC 222 ...
One gene-encoded CBPs ABC 212 ...
Two gene encoded CBPs EFC... (7 Replies)
Discussion started by: yifangt
7 Replies
4. Shell Programming and Scripting
hi everyone,
im stuck in here with shell :) can you help me??
i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ... and i want to read each one of them and search for some information and if i found the right one i save in new file with new... (6 Replies)
Discussion started by: andreia
6 Replies
5. Shell Programming and Scripting
Hello,
I have a script that checks every file with a specific extension in a specific directory. The file names contain some numerical output and I am recording the file names with the best n outcomes.
The script finds all files in the directory with the extension .out.txt and uses awk to... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
6. Shell Programming and Scripting
wget -x -i link.txt
The above downloads and create unique entries for the 97 links in the text file. However, each new file is saved as CM080 with a FILE extention. Is there a way to convert each file in that directory to a .txt? The 97 files are in... (12 Replies)
Discussion started by: cmccabe
12 Replies
7. Shell Programming and Scripting
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies
8. Shell Programming and Scripting
I am trying to download all files from a user authentication, password protected https site, with a particular extension (.bam). The files are ~20GB each and I am not sure if the below is the best way to do it. I am also not sure how to direct the downloaded files to a folder as well as external... (7 Replies)
Discussion started by: cmccabe
7 Replies
9. UNIX for Dummies Questions & Answers
i want to save current day file daily
for this is am using below command.
cp -p $(ls -lrt | grep "Apr 15" | awk '{print $9}'
in order to script this part, i am saving date output in a file using below command
date | awk '{print $2,$3}' >>t1
thru below command i want to list the file of... (7 Replies)
Discussion started by: scriptor
7 Replies
10. Shell Programming and Scripting
I dont want to use for loop since it is using a lot of resources especially to a thousand files. Wanting to have a while? or something will find files that has been modifed or created yesteraday. View it. And search for soemthing and save it to a certain folder.
for i in `find ./ -mtime... (3 Replies)
Discussion started by: invinzin21
3 Replies
LEARN ABOUT DEBIAN
padre::autosave
Padre::Autosave(3pm) User Contributed Perl Documentation Padre::Autosave(3pm)
NAME
Padre::Autosave - auto-save and recovery mechanism for Padre
SYNOPSIS
my $autosave = Padre:Autosave->new( db => 'path/to/database' );
$autosave->save_file( $path, $type, $data, $timestamp ) = @_;
DESCRIPTION
The longer auto-save plan
The following is just a plan that is currently shelved as some people on the Padre development list think this is not necessary and one
should use a real version control for this anyway.
So I leave it here for now, for future exploration.
I'd like to provide auto-save with some history and recovery service.
While I am writing this for Padre I'll make the code separate so others can use it.
An SQLite database will be used for this but theoretically any database could be used. Event plain file system.
Basically this will provide a versioned file system with metadata and automatic cleanup.
Besides the content of the file we need to save some meta data:
path to the file will be the unique identifier
timestamp
type of save (initial, auto-save, user initiated save, external)
When opening a file for the first time it is saved in the database.(initial)
Every N seconds files that are not currently in "saved" situation are auto-saved in the database making sure that they are only saved if
they differ from the previous state. (auto-save)
Evey time a file is saved it is also saved to the database. (user initiated save) Before reloading a file we auto-save it. (auto-save)
Every time we notice that a file was changed on the disk if the user decides to overwrite it we also save the (external) changed file.
Before auto-saving a file we make sure it has not changed since the last auto-save.
In order to make sure the database does not get too big we setup a cleaning mechanism that is executed once in a while. There might be
several options but for now: 1) Every entry older than N days will be deleted.
Based on the database we'll be able to provide the user recovery in case of crash or accidental overwrite.
When opening padre we should check if there are files in the database that the last save was not a user initiated save and offer recovery.
When opening a file we should also check how is it related to the last save in the database.
For buffers that were never saved and so have no file names we should have some internal identifier in Padre and use that for the auto-save
till the first user initiated save.
The same mechanism will be really useful when we start providing remote editing. Then a file is identified by its URI (
ftp://machine/path/to/file or scp://machine/path/to/file )
my @types = qw(initial, autosave, usersave, external);
sub save_data {
my ($path, $timestamp, $type, $data) = @_;
}
perl v5.14.2 2012-06-27 Padre::Autosave(3pm)