__inc_link8
Modify a symlink to point to the next file in sequence this program is part of afbackup
Usage
__inc_link [-s]
<symlink>
<increment>
Overview
the sequence will be determined, to what the given symlink points. The integer number at the end of this filesystem entry will be increased by the given increment (may be negative).
The symlink will be removed and a new one created pointing to the resulting filesystem entry. If there is no filesystem entry with the resulting name exists, an error message is printed. If the new symlink cannot be created or the old one cannot be removed an error messages are printed. If everything works fine and the -s flag (silent) is not supplied, the name of the filesystem entry to that the new symlink points, is printed. If any error occurs the original symlink remains unchanged.
Examples
- if ls -l reports:
-
lrwxrwxrwx 1 af user 13 Oct 8 14:00 the_link -> file.number.4
-
and the command __inc_link the_link 2 is entered, the result of a following ls -l will be:
-
lrwxrwxrwx 1 af user 13 Oct 8 14:00 the_link -> file.number.6
-
and some more (file.number.6 must exist)
Releases
3 releases since Debian 3.0 (Woody); the text changed 1 time.