Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dh_usrlocal(1) [linux man page]

DH_USRLOCAL(1)							     Debhelper							    DH_USRLOCAL(1)

NAME
dh_usrlocal - migrate usr/local directories to maintainer scripts SYNOPSIS
dh_usrlocal [debhelperoptions] [-n] DESCRIPTION
dh_usrlocal is a debhelper program that can be used for building packages that will provide a subdirectory in /usr/local when installed. It finds subdirectories of usr/local in the package build directory, and removes them, replacing them with maintainer script snippets (unless -n is used) to create the directories at install time, and remove them when the package is removed, in a manner compliant with Debian policy. These snippets are inserted into the maintainer scripts by dh_installdeb. See dh_installdeb(1) for an explanation of debhelper maintainer script snippets. If the directories found in the build tree have unusual owners, groups, or permissions, then those values will be preserved in the directories made by the postinst script. However, as a special exception, if a directory is owned by root.root, it will be treated as if it is owned by root.staff and is mode 2775. This is useful, since that is the group and mode policy recommends for directories in /usr/local. OPTIONS
-n, --noscripts Do not modify postinst/prerm scripts. NOTES
Note that this command is not idempotent. dh_prep(1) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. CONFORMS TO
Debian policy, version 2.2 SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Andrew Stribblehill <ads@debian.org> 8.9.0ubuntu2.1 2012-06-12 DH_USRLOCAL(1)

Check Out this Related Man Page

DH_USRLOCAL(1)							     Debhelper							    DH_USRLOCAL(1)

NAME
dh_usrlocal - migrate usr/local directories to maintainer scripts SYNOPSIS
dh_usrlocal [debhelperoptions] [-n] DESCRIPTION
dh_usrlocal is a debhelper program that can be used for building packages that will provide a subdirectory in /usr/local when installed. It finds subdirectories of usr/local in the package build directory, and removes them, replacing them with maintainer script snippets (unless -n is used) to create the directories at install time, and remove them when the package is removed, in a manner compliant with Debian policy. These snippets are inserted into the maintainer scripts by dh_installdeb. See dh_installdeb(1) for an explanation of debhelper maintainer script snippets. When the Rules-Requires-Root field is not (effectively) binary-targets, the directories in /usr/local will have ownership root:staff and the mode will be 02775. These values have been chosen to comply with the recommendations of the Debian policy for directories in /usr/local. When Rules-Requires-Root has an effective value of binary-targets, the owners, groups and permissions will be preserved with one exception. If the directory is owned by root:root, then ownership will be reset to root:staff and mode will be reset to 02775. This is useful, since that is the group and mode policy recommends for directories in /usr/local. OPTIONS
-n, --no-scripts Do not modify postinst/prerm scripts. NOTES
Note that this command is not idempotent. dh_prep(1) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. CONFORMS TO
Debian policy, version 2.2 SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Andrew Stribblehill <ads@debian.org> 11.1.6ubuntu2 2018-05-10 DH_USRLOCAL(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

OR'ing condition in script

Hi, I have the following requirement. I am building a product on linux. The final build executables and libraries are all in different directories. I am writing a release script to collect all these final build items into a directory in /home/$USER/release. I have the following condition: ... (9 Replies)
Discussion started by: vino
9 Replies

2. UNIX for Dummies Questions & Answers

what is the command to get my ip ?

is there any build in command that gives you the local ip ? (10 Replies)
Discussion started by: umen
10 Replies

3. Shell Programming and Scripting

Create Folder in Multiple Directories

Hi, I am trying to figure out how to have a folder created in multiple directories. For example /home is where we have over 1500 staff members directories, the staff members name is the name of directory under /home. I need to have a folder called "Desktop" created in every staff members directory.... (15 Replies)
Discussion started by: Stud33
15 Replies

4. Shell Programming and Scripting

Cutting text from one location to another

The following text appears multiple times in a script and it resides in many scripts. I would like to make the following changes to the text: Text: /usr/local/bin/gmail -t abc@yahoo.com -m "this is a test" -f xyz@yahoo.com I need to cut the text that comes after -m which is "this is a... (8 Replies)
Discussion started by: hemangjani
8 Replies

5. UNIX for Dummies Questions & Answers

editing sqlplus id@passwd in multiple scripts, users and directories

hi all, i was given by my supervisor a task to search for scripts which contain oracle sqlplus i.e "myusername/mypasswd @myDB" in every /home/userfolder, which are, all the scripts made by different user. I've done some find command to search string for sqlplus, but it may up too long to respond.... (8 Replies)
Discussion started by: Helmi
8 Replies

6. Shell Programming and Scripting

Reading text from a file

Guys, I am trying to read text from a file, into arrays. The format of the file is: @DATABASE femotest @PACKAGE_SPECS /usr/home/oracle92/sosa/scripts/test.pks /usr/home/oracle92/sosa/scripts/rep.pks @PACKAGE_BODIES ... (12 Replies)
Discussion started by: LiquidChild
12 Replies

7. Shell Programming and Scripting

printing directories

hi guys i'm trying to make a script that prints out a specified directory as some sort of tree, it prints out ok but i need it to print out every subdirectory within the directory but i'm not sure how to do that, this only goes in one or two levels deep but i need everythign inside that directory..... (9 Replies)
Discussion started by: Poison Ivy
9 Replies

8. Shell Programming and Scripting

Reading a file

I have all the subdirectories names in a text file. I have to read that text file and move that subdirectory and come back to orginal directory and again read anoteh sub directory like that. main > sub1 > testsub1.txt > sub2 > testsub2.txt > sub3 > testsub3.txt > sub4 >... (8 Replies)
Discussion started by: KiranKumarKarre
8 Replies

9. Shell Programming and Scripting

Comparing directories on different unix servers

Is it possible to use the diff command to compare two directories on different Unix (AIX) servers? We have two regions set up and we want to be able to compare if the scripts directory in both regions contain the same files? I want to figure out if its possible.. Have been messing around by... (10 Replies)
Discussion started by: Jazmania
10 Replies

10. Shell Programming and Scripting

find -exec directories with spaces

All, I have a cleanup script that removes directories and all contents underneath, but I am having issues with directories with spaces. This is the command I am currently running, how can I get it to work with directories with spaces? find /path -mindepth 3 -type d -exec rm -rf {} \; (29 Replies)
Discussion started by: markdjones82
29 Replies

11. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

12. Shell Programming and Scripting

Who can finish this script?

Good morning dear friends, I want to write an UNIX script to do the following task: We have 6 directories, called (SMS_01, SMS_02 ....... SMS_06), some files are distributed across these directories, but the distribution process is not good, I mean when I check these directories I found the... (14 Replies)
Discussion started by: Mohannad
14 Replies

13. Shell Programming and Scripting

FORTRAN Compiler

Need assistance in Fortran Compiler I need to install Fortran compiler on Linux distribution . I don't have root access to use rpm or yum to install compiler . Is there any way I can get it ? Are there any sites that has fortran compiler . Any links to download and install . (10 Replies)
Discussion started by: ajayram_arya
10 Replies

14. Shell Programming and Scripting

Shell script - group by

Hi, I have text file as shown below. root 25 oracle 25 batch 30 griduser 32 admin 35 root 25 oracle 25 batch 30 griduser 32 oracle 25 batch 30 griduser 32 xuser 45 admin 35 I want to group by based on user name, and the output need to be as below. Not necessary the username to be... (10 Replies)
Discussion started by: baladelaware73
10 Replies

15. Shell Programming and Scripting

Data to import the database as snippets

Hi all, I don't know if this the right place to post my question to get some ideas on how to done this. I have a text files extracted from OCR that need to have snippets to be import to database as snippet table which have columns "snippet, date, title" I dont know if shell scripts can do it... (11 Replies)
Discussion started by: lxdorney
11 Replies