Sponsored Content
Top Forums Shell Programming and Scripting How do I get an ls -l to not show the full directory path? Post 302574200 by Chubler_XL on Wednesday 16th of November 2011 08:55:18 PM
Old 11-16-2011
cd into the directory first:

Code:
cd /internet/post/forum/
ls -l
cd $OLDPWD

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getting full path from relative path

given a relative path, how do i convert it into a full one. i.e. if i am in /home/polypus and i am given foo/bar then to get a full path i can just concatinate it with pwd, but what if i am given "../mama" how do i programmatically convert: /home/polypus and ../mama into ... (4 Replies)
Discussion started by: polypus
4 Replies

2. UNIX for Dummies Questions & Answers

Show path name

Hello I'm new to this forum. So please spare me! I'm using SCO UnixWare 7.1.4 and created a few accounts. So far so good. When I login I see: $. But here I want to see (for example), /home 25$ So I want to see the pathname where I am without each time typing pwd (2 Replies)
Discussion started by: p.vvugt
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. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

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

7. UNIX for Dummies Questions & Answers

Shell Scripts - Show all directories with full information ( and no files)

Hello all, i'm stumped.... I need to list all directories with all there info and exclude the files, then vice versa. I am not sure if I need to string several ls commands together or how to even do that. I believe I need to do some variation of ls -l but need to figure out how to take out the... (5 Replies)
Discussion started by: citizencro
5 Replies

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

9. Shell Programming and Scripting

How to list all Subdirectories and files with its full path in a parent directory?

How to list all Subdirectories and files with its full path in a parent directory? (1 Reply)
Discussion started by: johnveslin
1 Replies

10. 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
ost::IPV4Host(3)					     Library Functions Manual						  ost::IPV4Host(3)

NAME
ost::IPV4Host - This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. SYNOPSIS
#include <address.h> Inherits ost::IPV4Address. Public Member Functions IPV4Host (const char *host=NULL) Create a new host address for a specific internet host. IPV4Host (struct in_addr addr) Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. IPV4Address & operator= (unsigned long addr) Allows assignment from the return of functions like inet_addr() or htonl() IPV4Host & operator&= (const IPV4Mask &mask) Mask the internet host address object with a network mask address. Friends class __EXPORT IPV4Mask __EXPORT IPV4Host operator& (const IPV4Host &addr, const IPV4Mask &mask) Additional Inherited Members Detailed Description This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. Author: David Sugar dyfet@ostel.com Address of a specific Internet host machine. Constructor &; Destructor Documentation ost::IPV4Host::IPV4Host (const char *host = NULL) Create a new host address for a specific internet host. The internet host can be specified in a null terminated ASCII string and include either the physical host address or the DNS name of a host machine. Hence, an IPV4Host ('www.voxilla.org') can be directly declaired in this manner. Defaults to the IP address that represents the interface matching 'gethostname()'. Parameters: host dns or physical address of an Internet host. ost::IPV4Host::IPV4Host (struct in_addraddr) Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. Parameters: addr binary address of internet host. Member Function Documentation IPV4Host& ost::IPV4Host::operator&= (const IPV4Mask &mask) Mask the internet host address object with a network mask address. This is commonly used to coerce an address by subnet. IPV4Address& ost::IPV4Host::operator= (unsigned longaddr) [inline] Allows assignment from the return of functions like inet_addr() or htonl() Reimplemented from ost::IPV4Address. References ost::IPV4Address::operator=(). Friends And Related Function Documentation friend class __EXPORT IPV4Mask [friend] __EXPORT IPV4Host operator& (const IPV4Host &addr, const IPV4Mask &mask) [friend] Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::IPV4Host(3)
All times are GMT -4. The time now is 07:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy