Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dpkg::path(3) [linux man page]

Dpkg::Path(3)							   libdpkg-perl 						     Dpkg::Path(3)

NAME
Dpkg::Path - some common path handling functions DESCRIPTION
It provides some functions to handle various path. METHODS
get_pkg_root_dir($file) This function will scan upwards the hierarchy of directory to find out the directory which contains the "DEBIAN" sub-directory and it will return its path. This directory is the root directory of a package being built. If no DEBIAN subdirectory is found, it will return undef. relative_to_pkg_root($file) Returns the filename relative to get_pkg_root_dir($file). guess_pkg_root_dir($file) This function tries to guess the root directory of the package build tree. It will first use get_pkg_root_dir(), but it will fallback to a more imprecise check: namely it will use the parent directory that is a sub-directory of the debian directory. It can still return undef if a file outside of the debian sub-directory is provided. check_files_are_the_same($file1, $file2, $resolve_symlink) This function verifies that both files are the same by checking that the device numbers and the inode numbers returned by stat()/lstat() are the same. If $resolve_symlink is true then stat() is used, otherwise lstat() is used. canonpath($file) This function returns a cleaned path. It simplifies double //, and remove /./ and /../ intelligently. For /../ it simplifies the path only if the previous element is not a symlink. Thus it should only be used on real filenames. $newpath = resolve_symlink($symlink) Return the filename of the file pointed by the symlink. The new name is canonicalized by canonpath(). my $cmdpath = find_command($command) Return the path of the command if available on an absolute or relative path or on the $PATH, undef otherwise. my $control_file = get_control_path($pkg, $filetype) Return the path of the control file of type $filetype for the given package. my @control_files = get_control_path($pkg) Return the path of all available control files for the given package. AUTHOR
Raphael Hertzog <hertzog@debian.org>. 1.16.0.3 2012-04-17 Dpkg::Path(3)

Check Out this Related Man Page

Dpkg::Conf(3)							   libdpkg-perl 						     Dpkg::Conf(3)

NAME
Dpkg::Conf - parse dpkg configuration files DESCRIPTION
The Dpkg::Conf object can be used to read options from a configuration file. It can exports an array that can then be parsed exactly like @ARGV. FUNCTIONS
my $conf = Dpkg::Conf->new(%opts) Create a new Dpkg::Conf object. Some options can be set through %opts: if allow_short evaluates to true (it defaults to false), then short options are allowed in the configuration file, they should be prepended with a single dash. @$conf @options = $conf->get_options() Returns the list of options that can be parsed like @ARGV. $conf->load($file) Read options from a file. Return the number of options parsed. $conf->parse($fh) Parse options from a file handle. Return the number of options parsed. $conf->filter(remove => $rmfunc) $conf->filter(keep => $keepfunc) Filter the list of options, either removing or keeping all those that return true when &$rmfunc($option) or &keepfunc($option) is called. $string = $conf->output($fh) Write the options in the given filehandle (if defined) and return a string representation of the content (that would be) written. "$conf" Return a string representation of the content. $conf->save($file) Save the options in a file. AUTHOR
Raphael Hertzog <hertzog@debian.org>. 1.16.15 2014-06-05 Dpkg::Conf(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding find command

I need help in using find to get the list of all the files with a particular filename in the directory path (Base directory + search directory) for a period of 20 days from the date specified by the user. For eg: Base Directory: /datatest2/example Search directory:consumer_details Graph_name to... (3 Replies)
Discussion started by: avishekp
3 Replies

2. UNIX for Dummies Questions & Answers

Modify Path

Hi, This is certainly a simple question, but I have yet to receive sufficient info concerning it. I am using BASH on a Powerbook G4 running Leopard. - I would like to permanently add a directory to my path. How do I do this? - I understand that I can view my path by: echo $PATH. Is there a... (4 Replies)
Discussion started by: msb65
4 Replies

3. Shell Programming and Scripting

Verify the directory path

Hi, We have the csv file which contains the directory path and a file Eg:- Path resoureName /test/india/sample,abc.txt /test1/us/sample2,xyz.csv I have to verify above directory path which is exist or not in the server If so, i have to return the path.Moreover i have to validate the "/"... (1 Reply)
Discussion started by: sollins
1 Replies

4. UNIX for Dummies Questions & Answers

Path Name

Is there a way I can display the directory and its size, without displaying the entire path my command is du -h | sort -nr | head -10 for example my output is 504K ./vpworkspace/.vpprefdata/LayoutPerspectiveData I want it to be 504K .vpworkspace (3 Replies)
Discussion started by: desai.rishabh
3 Replies

5. UNIX for Dummies Questions & Answers

command to find the absolute path

i understand by using the pwd command we get the present working directory. which command is used to find absolute path from home directory to root.. What is absolute path to your and root user's home directory.:confused::confused::confused: (2 Replies)
Discussion started by: shaziafathima
2 Replies

6. UNIX for Advanced & Expert Users

Getting real path to directory

Hi friends, Need your help. The question is: 1) We have directory '/SomeDirectory/SubDirectory' 2) And have symlink pointing to it like '/AnotherOneDirectory/symlink' '/AnotherOneDirectory/symlink' -> '/SomeDirectory/SubDirectory' 3) Need to get real path without symlinks knowing only... (7 Replies)
Discussion started by: kandrewo
7 Replies

7. Shell Programming and Scripting

Return Full File Path To Array PERL

Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code; where $input=C:\test # change to and open the comparison directory chdir("$input2") || die "Cannot change dir: $!"; opendir(DIR2,... (2 Replies)
Discussion started by: cold_Que
2 Replies

8. UNIX for Dummies Questions & Answers

lstat problem

Hello, I have a little problem with lstat. I use the find utility, to find a path for a file in my system. After that,I take that path and I pass it in lstat, but lstat returns -1, and this error : no such file or directory. So I m trying to "ls" the path in the shell, but it also fails. ... (2 Replies)
Discussion started by: garag11
2 Replies

9. Shell Programming and Scripting

Help regarding a Perl Program

I want to traverse a durectory for a particular file. Situataion is like this. Path is ABC/a/c/g. it has around 100 folders in it. Search a directory which has word "*latest*" in its path. and then from the latest go through z/x/c to file final.html. In total, i want it to go through... (4 Replies)
Discussion started by: hemasid
4 Replies

10. UNIX for Dummies Questions & Answers

How to get the current directory Path?

How to get the current directory Path in your prompt? i am getting a $ mark only in my prompt? Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies

11. UNIX for Dummies Questions & Answers

How can i assign directory path to a variable in perl?

Hai how can I assign directory path to a variable in perl Thanks&Regards kiran (2 Replies)
Discussion started by: kiran425
2 Replies

12. UNIX for Advanced & Expert Users

How can i assign directory path to a variable in perl?

Hai how can I assign directory path to a variable in perl Thanks&Regards kiran (3 Replies)
Discussion started by: kiran425
3 Replies

13. UNIX for Dummies Questions & Answers

Path variable in Linux?

Hi guys, In Windows, whenever I want a execute a program using just a relative path on the command prompt, I simply edit the 'Path' variable and append my parent directory. Is there something like this available in Unix? I have a binary for Virtualbox called VBoxManage that I want to execute... (6 Replies)
Discussion started by: silverdust
6 Replies

14. Linux

Find a string in a path

Hi All, I am trying to find a particular string in a path, but able to do so. I tried through grep command but its taking so long time which is not appropriate. e.g: Path : /oct/oracle/apps/OMEC/appl/xxaterp/1.0/reports/US/ Suppose in this path we have 10 .rdf file and I want to... (2 Replies)
Discussion started by: Vikash163
2 Replies

15. Shell Programming and Scripting

Symlink creation

I am trying to setup my plex server to use symlinks rather than host the movie files. in my storage directory, i have both movies(some in subdirectory of the name and some just in the parent directory) and tvshows, which have subdirectories for each season, which contains the episodes i would... (3 Replies)
Discussion started by: bandion
3 Replies