Sponsored Content
Top Forums Shell Programming and Scripting How Do I Navigate To A Directory??? Post 302160014 by hemangjani on Sunday 20th of January 2008 01:05:47 AM
Old 01-20-2008
Use the 'cd' command.
cd - Change Directory.
Usage:
$ cd directory_name

Use 'ls' for listing files and directories instead of 'dir'.

Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can you navigate ABOVE the home directory?

Hello, How do I navigate to the level ABOVE the home directory? I have the following structure on my drive, bearing in my I'm using a cygwin port on Windows. C:\ C:\cygwin C:\cygwin\bin C:\cygwin\otherfolders C:\cygwin\home (the home directory) C:\cygwin\home\H (my user directory) ... (4 Replies)
Discussion started by: patwa
4 Replies

2. UNIX for Dummies Questions & Answers

Viewing Directory Content as You Navigate Directories in UNIX

Hi, Can someone help me figure out how to view directory content while I navigate directories (without having to go to the actual directory and "ls-ing" it)? Is there some keyboard shortcut for this? For instance, it would be useful if I could see the content of a directory when I'm copying... (2 Replies)
Discussion started by: shelata
2 Replies

3. UNIX for Dummies Questions & Answers

How to navigate previous files one by one.

Hi can you tell me if i have opened no of files using vi editior then how can i navigate previous files one by one. Suppose i have opened five files using vi editor as below vi file1 file2 file3 file4 file5 and nom i am in the last file file5 then if i want to go to previous file file 4 and... (5 Replies)
Discussion started by: ajayshukla
5 Replies

4. Shell Programming and Scripting

script to navigate thrugh directories

Hi, I have a requiremnet where i need to apply logic on directories and sub-direcotories. Example: base="/a/b/c" base1="/a/b/c/d/e" subfolders in both base and base1 are same : es, ig, os var1=es var2=ig var3=os Now i have used the follwoing lines in my code and these are... (3 Replies)
Discussion started by: sussane
3 Replies

5. Shell Programming and Scripting

Script That Can navigate to 3 differents directory & remove files under them

Hi I am Trying to Write a script that can goto 4 different directorys on the server & remove the Files older then 30 days ?? /logs logs1 logs2 logs3 Now I need to remove files under logs1 logs2 logs3 which are older then 30 days whose name stat 'sit' , 'mig','bld' . in... (3 Replies)
Discussion started by: Beginner123
3 Replies

6. AIX

Do you need execute permission to navigate to a directory?

i have a user 'bart' which does not belong to apps group (as shown below) and i want him to be able to navigate to TEST directory.. i gave him read access but he cannot get through. when i added execute permission he was able to navigate to TEST drwxr-xr-- 3 draco apps 4096 Apr... (2 Replies)
Discussion started by: chipahoys
2 Replies

7. Shell Programming and Scripting

need to navigate into specified folder and delete the files

Hi all, I need to write a script to naviagate into the list of specified folder and delete the files in it. I have mentioned the list of folders in a external file so it can be reusable. The issue is am facing now is that, i am not understating on how to navigate into the folder locations... (6 Replies)
Discussion started by: Nithz
6 Replies

8. Red Hat

Fast yet simple way to navigate directories

If you are like me, typing CD command again and again would quickly get tiresome and wonder there must be a better way to do it. I have done some searching on Google and this forum. The results I get (using alias, CDPATH or PUSHD) do not satisfy me completely, so I decide to do it my way.... (10 Replies)
Discussion started by: IKE0000
10 Replies

9. UNIX for Dummies Questions & Answers

Need to navigate to HOME directory when I log in

Hi, Currently i'm logging as a user say atgdev. When I login it takes me to directory /. I see the home directory set as /home/atgdev/ I want that when i log in it shud directly go to my home directory i.e /home/atgdev/. I thought .profile in /home/atgdev/ will be invoked first when i log... (9 Replies)
Discussion started by: Gangadhar Reddy
9 Replies

10. UNIX for Dummies Questions & Answers

How to Navigate to Windows Desktop?

I want to use my Desktop for saving files of my codes. Looking for Desktop in my OS (C : ) and couldn't find it anywhere. Is it possible to navigate to your desktop? If so how? By the way, I am using Cygwin. (6 Replies)
Discussion started by: DyslexicChciken
6 Replies
mktemp(1)						      General Commands Manual							 mktemp(1)

Name
       mktemp - make a name for a temporary file

Syntax
       mktemp [ -c ] [ -d directory_name ] [ -p prefix ]

Description
       The  command makes a name for the pathname of a temporary file and writes that name to standard output. The name will not duplicate that of
       an existing file. The command does not create a new file. The file named must actually be created before can generate a new filename.

       Subsequent calls to will only generate a new file name if all previously generated file names have been	created  by  the  user	and  still
       exist.  Error messages are written to standard error.

       The  directory_name generated by is the concatenation of a directory name, a slash (/), a file prefix, a dot (.), a four digit number and a
       unique character.

       The directory name is chosen as follows:

	  (1)  If the -d option is specified, directory_name is used.

	  (2)  Otherwise, if the TMPDIR environment variable is set and a string that would yield a unique name can be obtained using the value of
	       that variable as a directory name, this value is used.

	  (3)  Otherwise, is used.

       The prefix is chosen as follows:

	  (1)  If the -p option is specified, prefix is used.

	  (2)  Otherwise, if the LOGNAME environment variable is set, it is used as the prefix.

	  (3)  Otherwise, the user's login name is used.

Options
       -c	   Causes to attempt to create a regular file using the generated (or created) name string. If file creation is successful, a zero
		   length file is created with access permissions derived from the process's file mode creation mask, see No attempt  is  made	to
		   create  a file if the length of the generated (or created) name string exceeds 1023 characters. It is the user's responsibility
		   to remove files created by use of this option.

       -d directory_name
		   Causes directory_name to be used as the directory portion of the pathname. In this case,  directory_name  is  used  instead	of
		   TMPDIR and

       -p prefix   Causes  the string prefix to be used as the file's prefix.  It is used instead of LOGNAM and the user's login name. If the pre-
		   fix is longer the 249 characters, it will be silently truncated to that length before the concatenation of the suffix.

Environmental Variables
       LOGNAME	   When the -p prefix option is not specified, the value of this variable is used as the prefix of the filename, if it exists.

       TMPDIR	   When the -d directory_name option is not specified, the value of this variable is used instead of

Restrictions
       If the user does not have write permission in the directory specified, and error message is reported and is used in its place.  The  entire
       path name can not exceed 1023 characters, and the temporary file name can not exceed 255 characters. If the generated file name is too long
       it is truncated to fit before the suffix is added.

See Also
																	 mktemp(1)
All times are GMT -4. The time now is 12:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy