Explain the difference between the commands cd ~smart and cd ~/smart


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Explain the difference between the commands cd ~smart and cd ~/smart
# 1  
Old 11-04-2010
Computer Explain the difference between the commands cd ~smart and cd ~/smart

Is it possible for both commands to work?
# 2  
Old 11-04-2010
Hi.

Yes.

The first (cd ~smart) will cd to the home directory or user smart.

The second will cd to a directory called smart in the current user's home directory. cd ~ will cd to the current user's home directory.
This User Gave Thanks to Scott For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need smart script !

Hi, I need a script to assign variables the below paths /appl/user_projects/domains/<xxx>/servers/<yyy>/logs Where <xxx> can be any number and name of directories. <yyy> can be another set of any number of names and directories. I want to neglect all the <xxx> and <yyy>... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. Shell Programming and Scripting

Smart Backup Script

Hello Im pretty new to scripting in linux but am keen to learn. I'm trying to create a backup script similar to a batch script I developed for windows (dos) where the backup is to a usb drive. no problems with the backup process but what I would like to do is automatically remove old files if... (2 Replies)
Discussion started by: TheGacko
2 Replies

3. Shell Programming and Scripting

smart script?

First, I know that's a bad title. I couldn't think of anything short enough. ... I wrote the following script to let me know when various parts of the network are down. It used to look like this before last weekend when I got over 500 emails about 1 host being down all weekend: this is in the... (1 Reply)
Discussion started by: raidzero
1 Replies

4. UNIX for Advanced & Expert Users

smart question

eg. : there is a file - 322 bytes, how can I (or you) view just a half of file (161 bytes)? (3 Replies)
Discussion started by: zylwyz
3 Replies
Login or Register to Ask a Question