Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Basic Linux command line question Post 302993062 by lobsang on Monday 6th of March 2017 11:52:22 AM
Old 03-06-2017
Code Basic Linux command line question

SmilieSmilieSmilie
These are list of command i typed on opensuse terminal and evolve lots of doubt around ,that i can't answer.


Code:
COMMAND 1   linux-xavv:/ # cd
COMMAND 2   linux-xavv:~ #

Does above command 1 and command two with red labelled sign make different meaning or same .

1

Code:
linux-xavv:/ # pwd
/

what does that (/) means in above


2

Code:
linux-xavv:/ # cd
linux-xavv:~ # pwd
/root


After clicking cd in command line . my working directory is changed to /root .
what is difference between question 1 and 2 . Am i a root or other user

3

Code:
linux-xavv:~ # su james
james@linux-xavv:/root> pwd
/root

even after entering a user as james. i still found my working directory is /root.
am i in root or in user James account.

4

Code:
james@linux-xavv:/root> cd..
james@linux-xavv:/> pwd
/

5

Code:
james@linux-xavv:/> su
Password: 
linux-xavv:/ # pwd
/

i return to root access and found / ..does that mean i am in root or any thing else
Code:
linux-xavv:/ #


Last edited by Scrutinizer; 03-06-2017 at 01:19 PM.. Reason: code tags; changed "doubt" to "question" in thread title
 

8 More Discussions You Might Find Interesting

1. Solaris

shutdown question from command line

solaris 10 logged in as root to command line...want to shut the system down....could not do this....when i chose shutdown the system seemed to squawk at me saying i'd lose whatever i was working on would be lost unless i logged out...after proceeding through this it took me to the gui log in... (6 Replies)
Discussion started by: drisnya
6 Replies

2. Linux

Basic Linux Shell Command

I'm working with telnet under windows and Xming. I connect to a network computer and I open Xterm. With Xterm I want to be able to open more than one windows like firefox, nedit etc. Example : When a open firefox on the xterm, I type "firefox", after that, I cannot make an other command until I... (1 Reply)
Discussion started by: Meccos
1 Replies

3. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

4. UNIX for Dummies Questions & Answers

Unix command line question

I'm new to Unix and I'm looking for some assistance. We have 20 different accounts we must login to every day. Logging in has become quite the chore and most nights, we have to log out. I'm looking for a way to simply copy and paste the commands into each window to make things easier. I have been... (2 Replies)
Discussion started by: Judo_Bear
2 Replies

5. UNIX for Dummies Questions & Answers

Basic IF Command Question

Hi, I have a months worth of data that I need to separate into weekly files. There is a date column with dates in the following format: YYYYMMDD. I'm thinking I can create the weekly files by using a grep command combined with an IF command and specify each day of the specific week I'm... (1 Reply)
Discussion started by: cwl
1 Replies

6. Shell Programming and Scripting

Basic line reading and file merge question

No doubt these questions have been answered many times, but I struggled to find them - sorry. 2 questions: 1. I wish to read in a file one line at a time and do 'stuff' with it, such as: file="tst2" while IFS= read -r line do echo `wget -qO -... (3 Replies)
Discussion started by: Golpette
3 Replies

7. UNIX for Beginners Questions & Answers

Question on bash command line

OS : RHEL / Oracle Linux 6.8 In bash shell, how can I replace a character under the cursor with another character ? In the below example , after I typed the following line, I realized that I meant 7013 and not 2013. So I move the cursor to the left and keep it on top of 2 (of 2013) and I want... (7 Replies)
Discussion started by: kraljic
7 Replies

8. UNIX for Beginners Questions & Answers

A question about Subversion and commit from the command line

Hey guys, so I want to start using the terminal when I do thinks like update, commit and whatnot. I am use to using kdesvn which is a GUI that helps me with subversion. However, kdesvn does not seem to play well on 18.04 and regardless I am trying to move away from GUI's in general. I want to... (1 Reply)
Discussion started by: Circuits
1 Replies
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy