Sponsored Content
Top Forums Shell Programming and Scripting Listing filesnames in bare format with fullpath Post 302104698 by sb008 on Friday 26th of January 2007 04:17:48 PM
Old 01-26-2007
# All files in the current directory and subdirectories
find . -type f | sed -e "s@^\.@$PWD@"
# All files in the current directory (no subdirectories)
find ./* -prune -type f | sed -e "s@^\.@$PWD@"
# All files on your system
find / -type f
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

O S for new bare PC

I have a new motherboard & HD etc that have working bios etc but won't accept my W98 upgrade as the O S, I need to know if I can get the Unix OS to work with it, instead of using Windows? I understand that the Unix OS works very well but will it install easily?? Al (5 Replies)
Discussion started by: Alrichards
5 Replies

2. UNIX for Dummies Questions & Answers

Extracting Filename from Fullpath

Hi, Any help on this would be very appreciated. I capture the full path & filename in a variable like (varFile=/home/user/extfile.txt). Now in my shell script I have to use only the filename part i.e. extfile.txt. How do I extract only the filename part from the variable? Thanks in... (3 Replies)
Discussion started by: njoshi
3 Replies

3. UNIX for Advanced & Expert Users

Unix Commands to display the Filesnames

Query: In a directory there are 20 files, I have to display the Filenames which contains the content as JAVA in any line of the file. Please tell me the command or commands. (3 Replies)
Discussion started by: kish_kk84
3 Replies

4. Shell Programming and Scripting

listing file with other format

Hello. If i use ls to list file, the output will be like this: ls list* list1.txt list2.txt list3.txt list4.txt list5.txt How can I list file like below (I tried to us ls -ltr list*.txt, but all of them with time, date in font of the file...but I don't need it)? list1.txt... (3 Replies)
Discussion started by: happyv
3 Replies

5. Shell Programming and Scripting

How to get filename from the fullpath and how to grep multiple strings

Hi, New to shell scripting.... I have log file content as below: I have to count the number of occurences of ERROR or INFO Messages. So, I cut 5 th column and uniquly sorted and redirected it to new.txt file. But I want copy to S*/Filename and T*/Filename of respective ERROR or INFO... (5 Replies)
Discussion started by: Shirisha
5 Replies

6. Shell Programming and Scripting

Listing files in a particular format

Hi, My unix version is as follows: uame -a HP-UX server-name B.11.11 U 9000/800 2329770924 unlimited-user license I just want to get file listing is a particular format listed below. name permission set(octal) size date (mon dd, yyyy) I am trying to use the following command. ... (14 Replies)
Discussion started by: manubatham20
14 Replies

7. Shell Programming and Scripting

modify ls -l (long listing format output) strictly using SED only straightforward goalhard 4 me doh

Below is a sample out of ls -l which I would like to rearrange or modify by field numbers for example I successfully managed to disect using simple paragraph however for ls -l I can't divide the rows or fields by field number. Successful modification by fields using SED sample: $ sed -e... (1 Reply)
Discussion started by: wolf@=NK
1 Replies

8. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies

9. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

Hi, My apologies if my query is already available on this forum but I am new and could not find. I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this? ... (4 Replies)
Discussion started by: 8709711
4 Replies

10. Shell Programming and Scripting

Script to generate HTML output format listing like orasnap

Hi, Is there any UNIX scripts out there that generates a listing output of some sort similar to OraSnap At the moment, I have a script that I run on multiple servers that has multiple databases and just querying the database sizes of those databases. It generates a text files that contains... (0 Replies)
Discussion started by: newbie_01
0 Replies
PWD(1)							    BSD General Commands Manual 						    PWD(1)

NAME
pwd -- return working directory name SYNOPSIS
pwd [-LP] DESCRIPTION
pwd writes the absolute pathname of the current working directory to the standard output. The following options are available: -L If the PWD environment variable is an absolute pathname that contains neither "/./" nor "/../" and references the current directory, then PWD is assumed to be the name of the current directory. -P Print the physical path to the current working directory, with symbolic links in the path resolved. The default for the pwd command is -P. pwd is usually provided as a shell builtin (which may have a different default). EXIT STATUS
The pwd utility exits 0 on success, and >0 if an error occurs. SEE ALSO
cd(1), csh(1), ksh(1), sh(1), getcwd(3) STANDARDS
The pwd utility is expected to be conforming to IEEE Std 1003.1 (``POSIX.1''), except that the default is -P not -L. BUGS
In csh(1) the command dirs is always faster (although it can give a different answer in the rare case that the current directory or a con- taining directory was moved after the shell descended into it). pwd -L relies on the file system having unique inode numbers. If this is not true (e.g., on FAT file systems) then pwd -L may fail to detect that PWD is incorrect. BSD
October 30, 2003 BSD
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy