Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding current working dir path Post 6687 by ober5861 on Monday 10th of September 2001 09:22:58 AM
Old 09-10-2001
I'm not sure how you would do it in a script, or where exactly you could get the info from... maybe awk or grep... but you can get a user's current directory through finger.

Hope that helps... maybe someone else knows how to get it through a script for sure. Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using grep to find a value in current dir and sub dirs?

Hey guys, I would like to find all files which contain "client1.dat". I would like to search from the current directory and all subs and print out all the files that have this. Any help would be greatly appreciated. Thanks much. (10 Replies)
Discussion started by: ecupirate1998
10 Replies

2. Shell Programming and Scripting

calling current working dir from script

Hello, I am having problem in setting current working directory from shell. I want to set pwd as an environmental variable in a script. I am following an existing script which is defined as HOME=$(shell dirname `pwd`) C_HOME=$(shell echo $(HOME) | sed -e 's:\/:\\\/:g' ) But when I am trying... (3 Replies)
Discussion started by: chandra004
3 Replies

3. Shell Programming and Scripting

full path of a file situated either in parent's dir. or parent's parent dir. so on...

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies

4. Shell Programming and Scripting

How do I define a particular dir in PATH variable and then unset that dir

How do I define a particular dir in front of PATH variable and then run some job and then at the end of job SET the PATH variable to original? in a script, WILL something like this work: ORIG_PATH=$PATH export PATH=/dir1/dir2:$PATH RUN SOME JOBS ..... unset PATH EXPORT... (2 Replies)
Discussion started by: Hangman2
2 Replies

5. UNIX and Linux Applications

CPIO Problem, copy to the root dir / instead of current dir

HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file! I tried all these commands cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies

6. Shell Programming and Scripting

"find . -printf" without prepended "." path? Getting path to current working directory?

If I enter (simplified): find . -printf "%p\n" then all files in the output are prepended by a "." like ./local/share/test23.log How can achieve that a.) the leading "./" is omitted and/or b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies

7. HP-UX

Unable to Set Prompt to current working DIR

HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively. So how do i set the PS1 variable to display my current working Directory as my prompt? I also tried PS1=$PWD, But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies

8. Shell Programming and Scripting

how to copy current date files to another dir

i have directory /abcd and i want to copy all today date files in /xyz directory. i am able to see the files by using below command but not able to understand copy. find . -mtime -1 -type f -exec ls -l {} \; (2 Replies)
Discussion started by: learnbash
2 Replies

9. Shell Programming and Scripting

Finding DIR

Done this basic level script called mydir that prints the message File is a directory if the file is a directory. Code: #!/bin/kasha cat LIST | while read LINE do if ] then ls -ltr $LINE >out give=$LINE grep $1 out > out.txt grep ^d out.txt if ] ... (7 Replies)
Discussion started by: Roozo
7 Replies

10. Shell Programming and Scripting

Save all the file of current date in another dir?

Hi i want to copy all the files of current date in another directory. for example, below i want to save all the file of 26 march to copied in debug dir. $ ls -lrt | tail -5 -rwxrwxrwx 1 khare guest 73 Jan 6 12:35 chk -rw-r--r-- 1 khare guest 770 Mar 26 02:21 cc1... (2 Replies)
Discussion started by: scriptor
2 Replies
SAFE_FINGER(8)						     Linux Programmer's Manual						    SAFE_FINGER(8)

NAME
safe_finger - finger client wrapper that protects against nasty stuff from finger servers SYNOPSIS
safe_finger [finger_options] DESCRIPTION
The safe_finger command protects against nasty stuff from finger servers. Use this program for automatic reverse finger probes from the tcp_wrapper (tcpd) , not the raw finger command. The safe_finger command makes sure that the finger client is not run with root privileges. It also runs the finger client with a defined PATH environment. safe_finger will also protect you from problems caused by the output of some finger servers. The problem: some programs may react to stuff in the first column. Other programs may get upset by thrash anywhere on a line. File systems may fill up as the finger server keeps sending data. Text editors may bomb out on extremely long lines. The finger server may take forever because it is somehow wedged. safe_finger takes care of all this badness. SEE ALSO
hosts_access(5), hosts_options(5), tcpd(8) AUTHOR
Wietse Venema, Eindhoven University of Technology, The Netherlands. Linux 21th June 1997 SAFE_FINGER(8)
All times are GMT -4. The time now is 01:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy