Sponsored Content
Top Forums UNIX for Advanced & Expert Users Shell command to print full path to current home directory Post 303044746 by MadeInGermany on Tuesday 3rd of March 2020 03:17:00 AM
Old 03-03-2020
It does not make sense to me.
The purpose of the bind mount is to let it appear under /home/ - why do you want to break it?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

home directory in search path

Is it unsafe to put your own home directory (a regular user) in your search path? I am writing useful shell scripts, but don't have the permissions to put them in /usr/bin. (Korn shell) thanks (2 Replies)
Discussion started by: jpprial
2 Replies

2. Shell Programming and Scripting

want the current directory without the absolute path

Hi guys I'm trying to move an empty directory to the $TRASH directory. Say the directory i have is ./hello/hello1/hello2 and i'm in hello2, and i want hello2 moved. this code: TRASH=$home/deleted find "$TRASH/$1" -type d -exec rmdir { } \; 2>/dev/null mv -f $1 $TRASH 2>/dev/null works... (2 Replies)
Discussion started by: olimiles
2 Replies

3. Shell Programming and Scripting

Sorting by Full directory path

I have a text file with full list of files with their full path. I wanted to sort it by directory then files then subdirectory by alphabetically. When I used the sort command it doesn't give like what I want. Could somebody help me on this. Here is the ex: This is what I'm getting... (2 Replies)
Discussion started by: javidraaj
2 Replies

4. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

5. UNIX for Dummies Questions & Answers

Present Working Directory (not the full path)

Hi, Is there a command that tells you right away the current working directory? I know the command "pwd", but that one gives the full path. if pwd gives me: /a/b/c/d/ggg/HERE I want something that will give me: HERE Thanks, Gaurab (13 Replies)
Discussion started by: gaurab
13 Replies

6. Shell Programming and Scripting

How do I get an ls -l to not show the full directory path?

Hey I'm new to the forums here, and I'm seeking help for this script that I'm writing. When I do ls -l of a directory it shows the full pathname for files in it. For example, if the directory is /internet/post/forum/ and the file is topic, it currently shows internet/post/forum/topic. What's the... (3 Replies)
Discussion started by: unity04
3 Replies

7. Shell Programming and Scripting

$0 doesn't have full directory path

I'm running AIX unix korn shell. If I echo $0, I only get the filename, it does not have the directory name also. So when I do: `dirname $0` it returns a . (meaning current directory). How get $0 to return the full path/filename? Do I need something in my .profile? Thank you. (8 Replies)
Discussion started by: sboxtops
8 Replies

8. 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

9. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

My input is as below : /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt /splunk/scrubbed/triumph/ifind.triumph.txt From the above input I want to extract the file names only . Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies

10. Linux

How to print full path name along with file extension?

Hi I have a requirement like this: /abc/a/x.txt /abc/a/y.txt /abc/b/x.gz /abc/b/y.txt I need output like this: /abc/a:*.txt /abc/b:*.txt /abc/b:*.gz I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name. Please... (5 Replies)
Discussion started by: lijjumathew
5 Replies
BIND(1) 						      General Commands Manual							   BIND(1)

NAME
bind, mount, unmount - change name space SYNOPSIS
bind [ option ... ] new old mount [ option ... ] servename old [ spec ] unmount [ new ] old DESCRIPTION
Bind and mount modify the file name space of the current process and other processes in the same name space group (see fork(2)). For both calls, old is the name of an existing file or directory in the current name space where the modification is to be made. For bind, new is the name of another (or possibly the same) existing file or directory in the current name space. After a successful bind, the file name old is an alias for the object originally named by new; if the modification doesn't hide it, new will also still refer to its original file. The evaluation of new (see intro(2)) happens at the time of the bind, not when the binding is later used. The servename argument to mount is the name of a file that, when opened, yields an existing connection to a file server. Almost always, servename will be a file in /srv (see srv(3)). In the discussion below, new refers to the file named by the new argument to bind or the root directory of the service available in servename after a mount. Either both old and new files must be directories, or both must not be directories. Options control aspects of the modification to the name space: (none) Replace the old file by the new one. Henceforth, an evaluation of old will be translated to the new file. If they are directo- ries (for mount, this condition is true by definition), old becomes a union directory consisting of one directory (the new file). -b Both files must be directories. Add the new directory to the beginning of the union directory represented by the old file. -a Both files must be directories. Add the new directory to the end of the union directory represented by the old file. -c This can be used in addition to any of the above to permit creation in a union directory. When a new file is created in a union directory, it is placed in the first element of the union that permits creation. The spec argument to mount is passed in the attach(5) message to the server, and selects among different file trees served by the server. The srv(3) service registry device, normally bound to /srv, is a convenient rendezvous point for services that can be mounted. After boot- strap, the file /srv/boot contains the communications port to the file system from which the system was loaded. The effects of bind and mount can be undone with the unmount command. If two arguments are given to unmount, the effect is to undo a bind or mount with the same arguments. If only one argument is given, everything bound to or mounted upon old is unmounted. EXAMPLES
To compile a program with the C library from July 16, 1992: mount /srv/boot /n/dump dump bind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.a mk SOURCE
/sys/src/cmd/bind.c /sys/src/cmd/mount.c /sys/src/cmd/unmount.c SEE ALSO
bind(2), open(2), srv(3), srv(4) BIND(1)
All times are GMT -4. The time now is 01:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy