Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have SUSE v9.1 multibooted with OS/2. Because I want a means of communication between the two OSes, I set up (in OS/2) a partition with a drive letter, formatted with JFS, which is one of the file-system formats thea SUSE can mount. SUSE mounts the partition at boot time, and sees the partition, the name of which is "images" at the moment.
By "sees", I mean that when I write <ls /mnt> in a terminal, SUSE reports "images" in a tasteful blue (I think). I am now the owner of the images directory.
From OS/2, I have populated the images partition with two files and a subdirectory which contains several files (none of them hidden or with any wierd attributes).
At present, the permissions for the images directory are:
(I made the permissions so broad for experimental purposes, they won't remain that way.)
I don't know what the 2 and 3 are; I don't know what the 48 and 72 are. I assume that the second line is meant to show what the permissions were before the most recent change.
But mainly what I don't know, and want very much to understand, is why I have found no way to display the direrctory of the directory "images" When I do <ls -a /mnt/images>, what I get is a miniscule display consisteing of dots, arranged thusly: <. ..>, i.e. a dot, then two spaces, then two more dots. Samuel F.B. Morse must be turning in his grave. What is this? Why don't I get a directory listing?
Well, first you are seeing the images directory. Or, at least, part of it. The ./ and ../ are elements of every *NIX directory. The first is a short-hand for "this directory" and the second means "this directory's parent directory."
When that's all you see, it means that the directory has been reported as "empty." In this case, I suspect It means that the OS/2 file access settings are blocking your Linux access attempts. Try a couple of things:
1) Create a small "test" file in the Images directory from Linux. For example
Code:
$ touch /mnt/Images/test
should create an empty file called "test" in the Images directory. If that works, a
Code:
$ ls -la /mnt/Images
should list the test file. (Oh, if you don't want to see the . and .. entries, use -lA instead of -la in the ls command.)
2) Reboot into OS/2 and see if you can see the "test" file in the OS/2 directory listing of Images. If you can, check the OS/2 access controls on the directory and files, and see how they differ (if they do) from those on the "test" file. If they do differer, change the others to have the same ACL info as the "test" file.
On the other hand, if you can't see the "test" file from OS/2, there is, I think, some security setting mismatch between the two systems that you'll need to correct. (Sorry, I don't know OS/2, and can't offer any advice there.)
I have a couple of thoughts on your predicament. First, make sure you have JFS compiled into your kernel. I think it would complain more when mounting if it didn't have the support, but verify it anyway.
I am assuming that you have "Images" listed in your /etc/fstab since you mount it using its name. Try mounting it using: mount /dev/hd## -t <filetype> /mnt/Images. Replace the # with the appropriate drive information. For example, if you have an ide drive and Images is on the 3rd partition, you would type: mount /dev/hda3 -t JFS /mnt/Images (to mount the partition in a directory named Images located under /mnt).
If you get it to mount, then do: df -hT and see what it reports for file system.
About the numbers in the output for ls, the 2 and 3 are the number of links to the file, the 48 and 72 are sizes. Try doing an ls man or info ls for a good description of the output and the many options. Info and man files can be tough going, especially for a newbie, but once you gain a little familiarity, the answer to many a problem can be found there.
Originally posted by PTrenholme Well, first you are seeing the images directory. Or, at least, part of it. The ./ and ../ are elements of every *NIX directory. The first is a short-hand for "this directory" and the second means "this directory's parent directory."
When that's all you see, it means that the directory has been reported as "empty." In this case, I suspect It means that the OS/2 file access settings are blocking your Linux access attempts. Try a couple of things:
1) Create a small "test" file in the Images directory from Linux. For example
Code:
$ touch /mnt/Images/test
should create an empty file called "test" in the Images directory. If that works, a
Code:
$ ls -la /mnt/Images
should list the test file. (Oh, if you don't want to see the . and .. entries, use -lA instead of -la in the ls command.)
2) Reboot into OS/2 and see if you can see the "test" file in the OS/2 directory listing of Images. If you can, check the OS/2 access controls on the directory and files, and see how they differ (if they do) from those on the "test" file. If they do differer, change the others to have the same ACL info as the "test" file.
On the other hand, if you can't see the "test" file from OS/2, there is, I think, some security setting mismatch between the two systems that you'll need to correct. (Sorry, I don't know OS/2, and can't offer any advice there.)
I never thought to relate the three dots to this idea, which is in fact very familiar to me. That's probably because of the quaint way that ls organizes its output, side by side on a single line, so that the three dots look like.... well ... three dots. Had the output been colunar (which would made any listing too easy to read), it would have been obvious. After I pass the current problem, the first item on my agenda will be to find a way to rationalize directory listings; I'm sure it must be possible.
So the problem remains -- why doesn't it see the files that I know are there. OS/2 does not do permissions; it has attributes. As I mentioned, the files do not have "hidden, or other wierd attributes, so they should be visible.
I think I can make out barely enough of your suggestion (1) to make a test file. Most of it, being in Linuxese, is still impenetrable to me, but I will study it carefully.
In (2) -- again, there are no access controls. The files have no attribute other than Archive, and should be visible to anything that looks in the directory/partition. If there is a security mismatch, it can only be that the files have not been affected by the act of setting the Linux permissions. OS/2 is, in this case, entirely passive, and therefore blameless.
Many thanks for your suggestion, which I will atempt later this evening or tomorrow.
Originally posted by d.goldthwaite I have a couple of thoughts on your predicament. First, make sure you have JFS compiled into your kernel. I think it would complain more when mounting if it didn't have the support, but verify it anyway.
I am assuming that you have "Images" listed in your /etc/fstab since you mount it using its name. Try mounting it using: mount /dev/hd## -t <filetype> /mnt/Images. Replace the # with the appropriate drive information. For example, if you have an ide drive and Images is on the 3rd partition, you would type: mount /dev/hda3 -t JFS /mnt/Images (to mount the partition in a directory named Images located under /mnt).
If you get it to mount, then do: df -hT and see what it reports for file system.
About the numbers in the output for ls, the 2 and 3 are the number of links to the file, the 48 and 72 are sizes. Try doing an ls man or info ls for a good description of the output and the many options. Info and man files can be tough going, especially for a newbie, but once you gain a little familiarity, the answer to many a problem can be found there.
Hope this helps you off towards a solution.
I have not yet any idea of how to recompile the kernel, but the concept scares me. I keep reading that nowadays one almost neveer needs to do that.
I didn't mount it using its name; it found ithe name of the partition which I have established in LVM of OS/2, when I made the partition. I will look in /etc/fstab for "images"; if it is there, the OS did it, because I didn't.
Thanks much for your explanations above.
I will investigate your very orderly suggestions when next I boot to SUSE. If nothing else, I'm sure they will help me with the non-mnemonic command names; I may even find a way to remember some of them. BTW, I _have_ visited the man and info pages for ls. They are not nearly as helpful as they might be, because they explain very little, but simply list unexplained facts and non-mnemonic options. There is little or no effort to make information accessible.
Thanks much. I'll be back in a day or so with a report.
Originally posted by hanasi [snip]
I think I can make out barely enough of your suggestion (1) to make a test file. Most of it, being in Linuxese, is still impenetrable to me, but I will study it carefully.[snip]
Hum. Well then, if you don't mind, a few "new Linux user" notes:
First, I assume that you are familiar with the "command line" or "console" usage, since you talked about using the "ls" command.
For almost every *nix command there is "on line documentation" available by using $ man <command> or $ info <command> (where <command> is, of course, the command for which you want information. For a briefer command description, a $ <command> --help often works.
For example, the first page of the dir command (an "alais" of the ls] command) help looks like this:
Code:
$ dir --help | more
Usage: dir [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not hide entries starting with .
-A, --almost-all do not list implied . and ..
--author print the author of each file
-b, --escape print octal escapes for nongraphic characters
--block-size=SIZE use SIZE-byte blocks
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
modification of file status information)
with -l: show ctime and sort by name
otherwise: sort by ctime
-C list entries by columns
--color[=WHEN] control whether color is used to distinguish file
types. WHEN may be `never', `always', or `auto'
-d, --directory list directory entries instead of contents,
and do not dereference symbolic links
-D, --dired generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -lst
-F, --classify append indicator (one of */=@|) to entries
--format=WORD across -x, commas -m, horizontal -x, long -l,
single-column -1, verbose -l, vertical -C
--full-time like -l --time-style=full-iso
-g like -l, but do not list owner
-G, --no-group inhibit display of group information
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
--si likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
follow symbolic links listed on the command line
--dereference-command-line-symlink-to-dir
follow each command line symbolic link
that points to a directory
--indicator-style=WORD append indicator with style WORD to entry names:
none (default), classify (-F), file-type (-p)
-i, --inode print index number of each file
-I, --ignore=PATTERN do not list implied entries matching shell PATTERN
-k like --block-size=1K
-l use a long listing format
-L, --dereference when showing file information for a symbolic
link, show information for the file the link
references rather than for the link itself
-m fill width with a comma separated list of entries
--more--
[The pipe ("|") takes the output of the first command as input to the second one.]
Thus, to do what you want, a
Code:
$ dir -lA /mnt/Images
should work. (Another "trick" is that, when the options are preceded by a single dash, and they take no arguments, they can be "concatenated," so -l -A becomes -lA
Another useful "trick" is the man -k <something> command which lists all the commands having manual pages containing the "<something>". You can also use info --apropos <something> for a similar search.
A third nice feature is "command completion:" If you type the first few characters of a command, hitting the <tab> key will complete the command or, if nothing happens, a second <tab> will usually list all possible completions. (Entering two <tab> keys on an empty line will offer to list all the commands recognized by the shell. In my case, I'm offered a list of 4024 commands, which is a bit much . . .)
The "completion" usually works other places in the command line. For example, when entering a file name.
There are on-line tutorials available in this forum, and they can be quite helpful. Click the "Tutorials" button at the top of the page for a menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.