Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
I was looking at my directories in my user dir /home/carlos & noticed that 2 directories have "root" next to it but I don't know why? I think I may have made those directories as root.
carlos@stricom:~$ ls -l
total 24
drwxr-xr-x 2 carlos carlos 4096 2005-10-14 18:49 drivers
drwxr-xr-x 3 carlos root 4096 2005-10-20 17:37 files
drwxr-xr-x 4 carlos root 4096 2005-10-19 11:38 movies
drwxr-xr-x 3 carlos root 4096 2005-10-19 10:38 music
drwxr-xr-x 7 carlos carlos 4096 2005-10-19 14:21 pics
drwxr-xr-x 5 carlos carlos 4096 2005-10-21 07:33 software
Can someone tell me why the above shows root and how I can change this? to read "carlos" like the rest? I tried "chown carlos /home/carlos/files" and that did not work.
The syntax for chown is chown owner:group. So to change both owner and group you'd use chown carlos:carlos files. To change only the owner you'd use the command you used. To change only the group you'd use chown :carlos files.
stricom:~# chown carlos:carlos /home/carlos/*
stricom:~# cd /home/carlos/
stricom:/home/carlos# ls -l
total 24
drwxr-xr-x 2 carlos carlos 4096 2005-10-14 18:49 drivers
drwxr-xr-x 3 carlos carlos 4096 2005-10-20 17:37 files
drwxr-xr-x 4 carlos carlos 4096 2005-10-19 11:38 movies
drwxr-xr-x 3 carlos carlos 4096 2005-10-19 10:38 music
drwxr-xr-x 7 carlos carlos 4096 2005-10-19 14:21 pics
drwxr-xr-x 5 carlos carlos 4096 2005-10-21 07:33 software
stricom:/home/carlos#
Everything in unix is treated as a file. The listing from ls will tell you how much space the directory file takes up, not its contents. A folder will fill a block of space on your hard drive (every file, regardless of how small, will fill at least one block). If your folders show a size of 4096 bytes, or 4kb, that would indicate that your hard drive is formatted with blocks that are 4kb in size.
If you want to see how much space the contents of a folder take up you need to use the du command. See its manpage for details.
Particularly, the directory is a sort of 'file' in which there is a list of file names and a number (inode) pointing to the file (or directory, or ...) to which it corresponds: it is an index of what's contained in that directory, it is not the full directory itself.