Sponsored Content
Top Forums Shell Programming and Scripting getting part of directory after a certain / Post 302627831 by vanessafan99 on Sunday 22nd of April 2012 02:07:06 AM
Old 04-22-2012
thanks for answering Smilie
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

current directory as part of the csh prompt

I would like my csh prompt to behave like the linux csh prompt setting done by linux command (set prompt="%n@%m %c]$ ") how do I do that? What I'm trying to do is that I would like to see what directory I'm in by looking at the prompt. I've figured out that %n is like $user, and %m is like... (3 Replies)
Discussion started by: jamesloh
3 Replies

2. Shell Programming and Scripting

Bash: How to get part of the directory name?

How can I write a script that determines the directory the user is in, and displays that path up until a particular point? Specifically, I need to find the text "packages" in the directory name, then I need to capture that directory and the one below it. For example, if the user is in the... (5 Replies)
Discussion started by: RickS
5 Replies

3. Shell Programming and Scripting

listing Directory chronologically based on part of file name

hi Everbody, I had file names as shown file_01_20101104.txt file_01_20101105.txt file_02_20101104.txt file_01_20101205.txt file_03_20101104.txt file_02_20101105.txt Now i want to list them based on the date in the file name as shown... file_01_20101104.txt file_02_20101104.txt... (3 Replies)
Discussion started by: Reddy482
3 Replies

4. UNIX for Dummies Questions & Answers

Remove part of file names in a directory

Hi, i have a directory full of pictures, .jpg files. Half of them begin with "beach_" (for ex beach_123_123456.jpg) i'm looking for a command to remove the "beach_" from all files in the directory. thanks (4 Replies)
Discussion started by: robertmanalio
4 Replies

5. UNIX for Dummies Questions & Answers

Renaming files with part of their pathname and copying them to new directory

Hi I think this should be relatively simple but I can't figure it out. I have several files with the same name in different folders within a directory (the output of a program that I ran). Something like this: ./myAnalysis/item1/round1/myoutput.txt ./myAnalysis/item1/round2/myoutput.txt... (2 Replies)
Discussion started by: jullee
2 Replies

6. Shell Programming and Scripting

Selecting/using part of directory names in script

I'm making a shell script to: -copy directories to a new location -perform conversions on the files within the copied directories -move the newly created files to a new directory Please see my super basic script and notes below... and thank you thank you thank you in advance !! ... (1 Reply)
Discussion started by: kayzee
1 Replies

7. Shell Programming and Scripting

Add part of directory name to filename

Hello, I need to add a part of folder name to the files inside it. For instance the file is HMCBackup_20150430.155027.tgz and it is under directory /nim/dr/HMCBackup/cops22 I need to add cops22 to the file name so as it would be cops22_HMCBackup_20150430.155027.tgz Any help in doing... (10 Replies)
Discussion started by: hasn318
10 Replies

8. UNIX for Advanced & Expert Users

A way to print only part of directory path

Hi, So I struggled to find a solution to the following problem: I want to make sed print only part of multiple different paths. So lets say we have /path/path1/path2/logs/bla/blabla /path/path1/path2/path3/logs/yadda/yadda/yadda Can someone suggest a way to make sed or other... (5 Replies)
Discussion started by: dampio
5 Replies

9. UNIX for Advanced & Expert Users

Linux cant cd into directory and part of group

I am part of the group group1. The directory permission I am trying to cd into are 770 for both the parent directory and child directory but I still can not cd into. What am I doing wrong? $ ls -l /NAS/infa/ drwxrwxr-x. 22 user1 group1 506 Jun 6 17:05 infa_shared $... (5 Replies)
Discussion started by: cokedude
5 Replies
NSD(8)                                                              NSD 3.2.12                                                              NSD(8)

NAME
nsd - Name Server Daemon (NSD) version 3.2.12. SYNOPSIS
nsd [-4] [-6] [-a ip-address[@port]] [-c configfile] [-d] [-f database] [-h] [-i identity] [-I nsid] [-l logfile] [-N server-count] [-n noncurrent-tcp-count] [-P pidfile] [-p port] [-s seconds] [-t chrootdir] [-u username] [-V level] [-v] DESCRIPTION
NSD is a complete implementation of an authoritative DNS nameserver. Upon startup, NSD will read the database specified with -f database argument and put itself into background and answers queries on port 53 or a different port specified with -p port option. The database must be generated beforehand with zonec(8). By default, NSD will bind to all local interfaces available. Use the -a ip-address[@port] option to specify a single particular interface address to be bound. If this option is given more than once, NSD will bind its UDP and TCP sockets to all the specified ip-addresses separately. If IPv6 is enabled when NSD is compiled an IPv6 address can also be specified. OPTIONS
All the options can be specified in the configfile ( -c argument), except for the -v and -h options. If options are specified on the com- mandline, the options on the commandline take precedence over the options in the configfile. Normally NSD should be started with the `nsdc(8) start` command invoked from a /etc/rc.d/nsd.sh script or similar at the operating system startup. -4 Only listen to IPv4 connections. -6 Only listen to IPv6 connections. -a ip-address[@port] Listen to the specified ip-address. The ip-address must be specified in numeric format (using the standard IPv4 or IPv6 notation). Optionally, a port number can be given. This flag can be specified multiple times to listen to multiple IP addresses. If this flag is not specified, NSD listens to the wildcard interface. -c configfile Read specified configfile instead of the default /etc/nsd3/nsd.conf. For format description see nsd.conf(5). -d Turn on debugging mode, do not fork, stay in the foreground. -f database Use the specified database instead of the default of /var/lib/nsd3/nsd.db. If a zonesdir: is specified in the config file this path can be relative to that directory. -h Print help information and exit. -i identity Return the specified identity when asked for CH TXT ID.SERVER (This option is used to determine which server is answering the queries when they are multicast). The default is the name returned by gethostname(3). -I nsid Add the specified nsid to the EDNS section of the answer when queried with an NSID EDNS enabled packet. -l logfile Log messages to the specified logfile. The default is to log to stderr and syslog. If a zonesdir: is specified in the config file this path can be relative to that directory. -N count Start count NSD servers. The default is 1. Starting more than a single server is only useful on machines with multiple CPUs and/or network adapters. -n number The maximum number of concurrent TCP connection that can be handled by each server. The default is 10. -P pidfile Use the specified pidfile instead of the platform specific default, which is mostly /var/run/nsd3/nsd.pid. If a zonesdir: is speci- fied in the config file, this path can be relative to that directory. -p port Answer the queries on the specified port. Normally this is port 53. -s seconds Produce statistics dump every seconds seconds. This is equal to sending SIGUSR1 to the daemon periodically. -t chroot Specifies a directory to chroot to upon startup. This option requires you to ensure that appropriate syslogd(8) socket (e.g. chrootdir /dev/log) is available, otherwise NSD won't produce any log output. -u username Drop user and group privileges to those of username after binding the socket. The username must be one of: username, id, or id.gid. For example: nsd, 80, or 80.80. -V level This value specifies the verbosity level for (non-debug) logging. Default is 0. -v Print the version number of NSD to standard error and exit. NSD reacts to the following signals: SIGTERM Stop answering queries, shutdown, and exit normally. SIGHUP Reload the database. SIGUSR1 Dump BIND8-style statistics into the log. Ignored otherwise. FILES
/var/lib/nsd3/nsd.db default NSD database /var/run/nsd3/nsd.pid the process id of the name server. /etc/nsd3/nsd.conf default NSD configuration file DIAGNOSTICS
will log all the problems via the standard syslog(8) daemon facility, unless the -d option is specified. SEE ALSO
nsdc(8), nsd.conf(5), nsd-checkconf(8), nsd-notify(8), nsd-patch(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. BUGS
NSD will answer the queries erroneously if the database was not properly compiled with zonec(8). Therefore problems with misconfigured mas- ter zone files or zonec(8) bugs may not be visible until the queries are actually answered with NSD. NLnet Labs jul 19, 2012 NSD(8)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy