LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   commandline chmod 770 .. (https://www.linuxquestions.org/questions/linux-newbie-8/commandline-chmod-770-a-769974/)

evarie 11-18-2009 10:26 AM

commandline chmod 770 ..
 
Hello, I am Dutch. So you can write dutch for me or easy english please?

Yes, i did something stupid what I do not know.

I did command:
sudo -s
chmod 770 .
chmod 770 ..

And now i cannot login on my test server noteboek.
Please do not ask why I use server software on my notebook.
Caus i like it and i use it only for typing text en learning linux commands. So i have a notebook with ubuntu server 8.04.2. And it has this problem about de commands I did stupid.
(I have more computers and hardware to support my self!)

First question is:
Why have linux after command ls -l -a this output?
drwxr-xr-x 21 root root 4096 2009-11-04 20:45 .
drwxr-xr-x 21 root root 4096 2009-11-04 20:45 ..


And how must it to set and use?
What is it's function?

How can i repair my server notebook?
Must i unmount my harddisk with a sqrewdriver and connect it to/on an other linux machine? If its needed, i can do that. But is there a more easy solution?

malekmustaq 11-18-2009 10:55 AM

evarie,

Quote:

First question is:
Why have linux after command ls -l -a this output?
drwxr-xr-x 21 root root 4096 2009-11-04 20:45 .
drwxr-xr-x 21 root root 4096 2009-11-04 20:45 ..

So the "Why". Those dots "." and ".." indicate that the current directory you are listing its files has "parent directories". The first three columns at the left containing "drwsr-xr-x" tell you whether it is a regular file or a directory, the "permissions" of the folder or file, then the owner (and its group) the amount of memory it uses, dates and lastly the name.

Quote:

And how must it to set and use?
What is it's function?

ls command is for listing der files or directories it contained.

Quote:

How can i repair my server notebook?
Must i unmount my harddisk with a sqrewdriver and connect it to/on an other linux machine? If its needed, i can do that. But is there a more easy solution?

There is no need to do that. What you need is not a screwdriver but a good tutorial, get it by clicking here.

Your questions are very basic and require long explanation, the kind that you can better get from reading a good tutorial. Use the tutorial as your guide and mentor as you practice using terminal commands.

Good luck.

pixellany 11-18-2009 11:09 AM

Quote:

Originally Posted by evarie (Post 3761448)
Hello, I am Dutch. So you can write dutch for me or easy english please?

Dutch? No. The site operates only in English.

Easy English? For someone who is not a native speaker, this may be an oxymoron, but we'll try

For most of your questions, I recommend the Bash Guide for Beginners---free at http://tldp.org

As for how to take apart the notebook, I would think that Google would find lots of information. If you want to pursue it here, start a new thread. (It does not fit in a thread about chmod)

Komakino 11-18-2009 11:14 AM

. means the directory you are currently in.
.. means the parent directory.

for example, if you are in /home/steve then . means /home/steve and .. means /home
if you are in /usr then . means /usr and .. mean /

kdelover 11-18-2009 11:18 AM

. - current directory
.. - parent directory

Look at this example

i created a directory called a foo which is empty and is under this path

Quote:

ryan@wsx04:/home/ryan/foo$
that is foo is under the directory ryan,doing ls revels ..

Quote:

drwxr-xr-x 2 ryan ryan 4096 2009-11-18 22:40 foo
The 2 denotes (under the links category denotes that) no of links it has,in a unix system the default for a directory is 2.The 2 means that the directory 2 has 2 links..one connecting to the ryan directory(parent directory) and one to itself(current directory).

Creating a directory called tom inside foo will increment the count of foo by 1 making it 3.Because the directory foo is linked to Tom and Ryan. In the below example am creating tom outside foo.

===Before===

Ryan(2)
|
|
|

===After Creating Foo===
Ryan(2+1) ( parent+current+foo)
|
|=>Foo
|

===After Creating Tom====
Ryan(2+1+1) (parent+current+tom+foo)
|
|=>Foo
|=>Tom

For ryan parnet is home and current is itself and rest are Foo and Tom so that makes it 4.

Hope You got it

evarie 11-18-2009 11:22 AM

Only the dots i need to know?
 
Sorry, I forgot to say that I know how I must work with the commands:
ls
chmod
chown

I also know what means 421 with rwx

So, I do only want to know what these dots means?

But I do not know what will happen when I do:
chmod 770 .
chmod 770 ..

pixellany 11-18-2009 02:33 PM

Ummmm, the answer has already been given:

For example:

".." means the host directory (If you are in /home/username/pictures, then ".." = /home/username

chmod -xyz .. means change the permissions for the host directory


All times are GMT -5. The time now is 02:00 AM.