Sponsored Content
Full Discussion: Find, backup and delete.
Top Forums Shell Programming and Scripting Find, backup and delete. Post 302891492 by Scott on Thursday 6th of March 2014 06:00:35 AM
Old 03-06-2014
But you're grepping on BACKPATH, not on FINDPATH - and on the name of the file, not its contents. And, BTW, if you ls a fully-qualified filename, the output will be a fully qualified filename.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find directory and create backup

What I'm attempting to do is create a script that will do a search for directories that meet the following criteria: find . -name "config" -type d this comes back with: ./dir1/anotherDir/test_dir/config ./dir1/anotherDir/test_dira/config ./dir2/test/test_dir/config The results could... (4 Replies)
Discussion started by: cbo0485
4 Replies

2. Shell Programming and Scripting

Mp3 backup using find, mkisofs

Hi. I want to create a Linux script to find all local mp3 files, create an ISO image. Later I will attempt to use growisofs Something like this: find ~ -name "*.mp3" | xargs mkisofs -o musicbackup tried variations on this but no luck. (4 Replies)
Discussion started by: lancest
4 Replies

3. Shell Programming and Scripting

Find and delete everything else...

Ok, new user, relatively new to scripting and need to move to the next stage with awk or sed or both. I have been using them both at a basic level in my script. I want to find a line, no problem, but then I want to delete everything on that line except for the word I am looking for AND the... (4 Replies)
Discussion started by: derekphl
4 Replies

4. Shell Programming and Scripting

Find all .htaccess files and make a backup copy in respective directories

Hey guys, I need to know how to locate all .htaccess files on the server and make a backup of them in the folder they reside before I run a script to modify all of them. So basically taking dir1/.htaccess and copying it as dir1/.htaccess_bk dir2/.htaccess copying as dir2/.htaccess_bk... (5 Replies)
Discussion started by: boxx
5 Replies

5. Shell Programming and Scripting

scripts to Initialise,backup,restore,delete and empty

you are to write scripts for a customer that would require a system enable the backing up of files and directories. The script should (these names should be used): 1. INITIALISE: Initialise the directory for the backup(called backup and should be in the home directory) and any other... (1 Reply)
Discussion started by: babby01
1 Replies

6. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

7. Shell Programming and Scripting

Script - Mysql backup and delete

Hello I have a production mysql server and archive server, unfortunitly its not possible to setup repliacation between the two, the reason is that the archive server is using some fancy storage engine which doesn't allow mysql replication. I'm trying to write a script using perl that does... (1 Reply)
Discussion started by: amlife
1 Replies

8. Shell Programming and Scripting

Look for, backup and delete symlinks

Hi, My first post here: Was looking if someone can help enhancing my code. I am limited to sh or ash shell (android / busybox) I made a script to look for busybox symlinks, backup them and delete them I have these questions about the below code: - busybox tar do not has the options... (2 Replies)
Discussion started by: Phil3759
2 Replies

9. Red Hat

RHEL 7: Backup Space and Delete is not working in console

Hi All, During my virtual machine power on i have rc3.d script to accept user inputs like IP address. This script gets executed during first time boot up. It was working fine till my VM is using RHEL6.5. Now we migrated to RHEL 7 environment. While accepting the user inputs in console, I... (4 Replies)
Discussion started by: kalpeer
4 Replies

10. UNIX for Advanced & Expert Users

AIX find duplicate backup files

I would like find and delete old backup files in aix. How would I go about doing this? For example: server1_1-20-2020 server1_1-21-2020 server1_1-22-2020 server1_1-23-2020 server2_1-20-2020 server2_1-21-2020 server2_1-22-2020 server2_1-23-2020 How would I go about finding and... (3 Replies)
Discussion started by: cokedude
3 Replies
tgt-setup-lun(8)					      System Manager's Manual						  tgt-setup-lun(8)

NAME
tgt-setup-lun - creates a target, adds a device to the target and defines initiators that can connect to the target SYNOPSIS
tgt-setup-lun -d device -n target_name [initiator_IP1 initiator_IP2 ...] [-h] DESCRIPTION
Starts tgtd if necessary and creates a target according to the supplied target_name. The format of the target name is as follows: iqn.2001-04.com.<hostname>-<target_name> The target name must be unique. The script then adds the requested device to the target. If specific IP addresses are defined, it adds them to the list of allowed initia- tors for that target. If no IP addresses is defined, it defines that the target accepts any initiator. EXAMPLES
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81 and 192.168.10.82: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82 Create a target that uses /dev/sdb1 and allows connections from any initiator: tgt-setup-lun -d /dev/sdb1 -n my_target Display help: tgt-setup-lun -h AUTHOR
Written by Erez Zilber REPORTING BUGS
Report bugs to <erezz@voltaire.com>. COPYRIGHT
Copyright (C) Voltaire Ltd. 2008. tgt-setup-lun(8)
All times are GMT -4. The time now is 11:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy