I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Hi,
I have a very urgent requirement here. I have to find all files in the specified directory but not in the sub directories(The directory name is stored in a variable) which are older than the current date as well as current time and rename it as filename_yyyymmddhhmmss.ext and move it into a... (7 Replies)
Hi all,
I always getting great response from this forum, that why i am putting again....
I am working in a company which is giving ATM support.In one of my production server a lot of files are getting generated every day. I want to move these files to another name.
The file name which is... (4 Replies)
Hi,
I have a requirement ,let us say 1000 files needs to be transferred in an hour from one path to another path and if the files (1000 files) are transferred within an hour ( say 40 mins), then the process should remain idle for the remaining time ( 20 mins). (3 Replies)
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
I need a script to clean up the files on our backup system. I was hoping this would be simple for someone to put together for me.
I'm sure I could do it, but I'm a bash n00b so it would definitely not be efficiently or within a reasonable amount of time. :(
Requirements:
- Root of backups... (3 Replies)
Hi All,
I have multiple files in the folder, I want to move those files into the other folder on based of name
File names:
Template_server1_01==>
Template_server1_02==>To one directory /Server1
Template_server1_03==>
Template_server2_01==>
Template_server2_02==>To one... (9 Replies)
There are some 25,000 files in 7,000 directories in my source library and I am trying to find oldest files. I am running this find:
find /usr/mysrc -name "*." -type f -mtime +8000 -exec ls -l {} 2>/dev/null
and playing with the days parameter for mtime, but the output is not sorted... (3 Replies)
Trying to delete my 3 oldest files.
I am learning despite the many questions.
This shows the files.
ls -1r /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/Ubuntu_Documents.zip_* | tail -n+6adding this on did not work.
| -exec rm {}------ Post updated at 05:43 PM ------
This works, but I... (15 Replies)
Discussion started by: drew77
15 Replies
LEARN ABOUT LINUX
dpkg::compression::process
Dpkg::Compression::Process(3) libdpkg-perl Dpkg::Compression::Process(3)NAME
Dpkg::Compression::Process - run compression/decompression processes
DESCRIPTION
This module provides an object oriented interface to run and manage compression/decompression processes.
METHODS
my $proc = Dpkg::Compression::Process->new(%opts)
Create a new instance of the object. Supported options are "compression" and "compression_level" (see corresponding set_* functions).
$proc->set_compression($comp)
Select the compression method to use. It errors out if the method is not supported according to "compression_is_supported" (of
Dpkg::Compression).
$proc->set_compression_level($level)
Select the compression level to use. It errors out if the level is not valid according to "compression_is_valid_level" (of
Dpkg::Compression).
my @exec = $proc->get_compress_cmdline()
my @exec = $proc->get_uncompress_cmdline()
Returns a list ready to be passed to "exec", its first element is the program name (either for compression or decompression) and the
following elements are parameters for the program.
When executed the program acts as a filter between its standard input and its standard output.
$proc->compress(%opts)
Starts a compressor program. You must indicate where it will read its uncompressed data from and where it will write its compressed
data to. This is accomplished by passing one parameter "to_*" and one parameter "from_*" as accepted by Dpkg::IPC::spawn.
You must call "wait_end_process" after having called this method to properly close the sub-process (and verify that it exited without
error).
$proc->uncompress(%opts)
Starts a decompressor program. You must indicate where it will read its compressed data from and where it will write its uncompressed
data to. This is accomplished by passing one parameter "to_*" and one parameter "from_*" as accepted by Dpkg::IPC::spawn.
You must call "wait_end_process" after having called this method to properly close the sub-process (and verify that it exited without
error).
$proc->wait_end_process(%opts)
Call Dpkg::IPC::wait_child to wait until the sub-process has exited and verify its return code. Any given option will be forwarded to
the "wait_child" function. Most notably you can use the "nocheck" option to verify the return code yourself instead of letting
"wait_child" do it for you.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Compression::Process(3)