Hello friends,
I'm learning to script, and I need help.
How can I get the latest/newest files based on date? the format is as following:
Feb 07 19:25 TESTPWD_file_1vk6pn40_19519_1
Feb 07 19:46 TESTPWD_file_1uk6pn40_19518_2
Feb 07 19:47 TESTPWD_file_20k6pn40_19520_2
Feb 07 19:56... (5 Replies)
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The program should search all files in current directory and it's subdirectories and list out the newest file by... (8 Replies)
I have a folder that has new files created everyday, is there a way i can filter them so that only the 5 newest files are displayed? I'm hoping this can be done by a one liner without a script.
for example my directory contains
-rw-r--r-- 1 root root 0 Jun 24 08:34 file112
-rw-r--r-- 1 root... (2 Replies)
I am new to shell scripting so i need some help need how to go about with this problem.
I have a directory which contains files in the following format. The files are in a diretory called /incoming/external/data
AA_20100806.dat
AA_20100807.dat
AA_20100808.dat
... (4 Replies)
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
I use this to make it easier to see when a backup script ran.
touch /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/$( date '+%m-%d-%Y_%I:%M-%p' ) I would like a script that would delete all but the newest file ONLY of this type 08-20-2018_01:24-PM (4 Replies)
TARGET_DIR='/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/'
REGEX='{4}-{2}-{2}_{2}:{2}' # regular expression that match to: date '+%Y-%m-%d_%H:%M'
LATEST_FILE="$(ls "$TARGET_DIR" | egrep "^${REGEX}$" | tail -1)"
find "$TARGET_DIR" ! -name "$LATEST_FILE" -type f -regextype egrep -regex... (7 Replies)
Discussion started by: drew77
7 Replies
LEARN ABOUT DEBIAN
rdiff-backup-fs
RDIFF-BACKUP-FS(1) General Commands Manual RDIFF-BACKUP-FS(1)NAME
rdiff-backup-fs - Filesystem for accessing rdiff-backup archives.
SYNOPSIS
rdiff-backup-fs <mount_point> <repository> [repositories ...] [-option ...]
DESCRIPTION
rdiff-backup-fs is a filesystem in userspace that reads rdiff-backup archives and provides convenient access.
OPTIONS --debug <0-4>
Run rdiff-backup-fs in foreground with given verbosity of debug messages.
-f, --full
Store information about all revisions in memory. CAUTION: this may take a lot of memory if your archive contains many revisions.
-l, --last
Displays files from the most recent increment as directories, each holding every version of the file. CAUTION: this stores informa-
tion about all revisions in memory and therefore may take a lot of memory if archive contains many revisions.
-c <n>, --caching <n>
How many files retrieved from the rdiff-backup archive may be cached by filesystem. By default rdiff-backup-fs will cache up to 10
files. If this switch is set to 0, no caching will be done.
-r <n>, --revisions <n>
How many revisions should be stored in memory for on demand revision retrieval. By default rdiff-backup-fs will store up to 10 revi-
sions in memory.
-d, --directory <path>
Set directory for directory with temporary files. By default rdiff-backup-fs uses /tmp.
-v, --version
Print version of rdiff-backup-fs and exit.
SEE ALSO rdiff-backup(1)COPYRIGHT
rdiff-backup-fs is Copyright (c) 2007-2011 Filip Gruszczyski.
rdiff-backup-fs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
AUTHORS
Filip Gruszczyski <gruszczy@gmail.com>
RDIFF-BACKUP-FS(1)