-1

OpenVMS DCL command DIRECTORY/NOHEADING displays just the full file name including path info in a single-column format without any of the normal headings for a directory listing. The /NOTRAILING switch removes the normal trailing total info that is displayed.

What is Linux for OpenVMS DIR/NOHEADING/NOTRAILING?

This example directory command from MYHOME:[MYDIR.SUBDIR] shows the complete file names including path info with no other info like size, date, headings and totals:

$ dir/noheading/notrailing
MYHOME:[MYDIR.SUBDIR]ABC.C;3
MYHOME:[MYDIR.SUBDIR]ABC.OBJ;3
MYHOME:[MYDIR.SUBDIR]ABC.EXE;3
CW Holeman II
  • 3,654
  • 5
  • 31
  • 49
  • 2
    Some `ls` flags, I guess. Please show us some sample output from `DIR /NOHEADING`, most people don't know VMS. – Gilles 'SO- stop being evil' Feb 04 '13 at 23:34
  • 1
    @Gilles, the "device" and "directory" information isn't available in `ls`. And IIRC, VMS has a 2 (or 3?) deep fixed directory structure. Just _way_ too different in concept. What does OP really need to know, and why? – vonbrand Feb 04 '13 at 23:37
  • @vonbrand, Normally one does not reference a device in file name but one can and yes, in that case, the syntax is different than on Linux systems but the question is not about the file naming conventions. Someone changed the tag on the question to be 'ls' but that was an error. The question is not specifying specific Linux commands. Initially in 1977 on 32-bit VAX hardware there was an 8 level limit on directories. OpenVMS on Alpha and I64 64-bit hardware there is no limit on the number of directory levels. – CW Holeman II Feb 05 '13 at 00:30
  • @C.W.HolemanII: Okay, so, what _do_ you want to see? Are you interested in the information (the device on which a file resides + full pathname) or in the formatting? – mattdm Feb 05 '13 at 00:37
  • The problem with this question is its lack of context. With a background in Microsoft/IBM/JP Software command interpreters, one will be familiar with things like [the `/f`, `/k`, and `/m` options to the (JP Software) `dir` command](https://jpsoft.com/help/dir.htm) and the default output format that they modify. But a Unix/Linux readership is not necessarily familiar with these notions. – JdeBP Jul 19 '18 at 15:19
  • @JdeBP Yes, the question is targeted to someone with knowledge in both worlds. It is not intended to be primer on VMS command line syntax. – CW Holeman II Jul 19 '18 at 21:34

1 Answers1

1

There is no ls command which will show full path information, because VMS and Unix are very conceptually different here. Files are data in the filesystem and filenames are effectively pointers to that data, not containers for the data. So, out of context, the names don't really have path information.

Also, by default, ls doesn't show any header or footer information. It might be that ls -1, which shows all of the files in the current directory in a single column is what you want. (Or, to carry what I said in the first paragraph, you could try ls -1i, which will give you the inode number of each file — a sort of unique identifier for the actual data in the filesystem. But you probably don't really want that.)

Alternately, you could try something other than ls:

find $(pwd) -maxdepth 1

will print out all of the filenames in the current working directory, one per line, with the current working directory prepended. )Add -mindepth 1 too, to leave out the directory itself, if need be.) Maybe that's what you want?

mattdm
  • 39,535
  • 18
  • 99
  • 133
  • 2
    `find $(pwd) -maxdepth 1` is it. Other than someone putting an 'ls' tag on the question I do not know why that has gotten so much attention. – CW Holeman II Feb 06 '13 at 04:08
  • From http://en.wikipedia.org/wiki/Files-11, the main filesystem for OpenVMS. http://en.wikipedia.org/wiki/File:Files11_directory_hierarchy.svg shows an example of directories in a filesystem which is organised in a directed acyclic graph (DAG) structure. Rather than inodes, files on a Files-11 disk (or volume set) have a unique file identification (FID) which indexes into the INDEXF.SYS file where metadata for the file is located. – CW Holeman II Feb 06 '13 at 04:37
  • @C.W.HolemanII Okay, but I still don't know exactly what you're trying to accomplish here. :) – mattdm Feb 06 '13 at 20:37
  • A list of complete file names including the path such as this answer (the one with the green check) produces. – CW Holeman II Feb 06 '13 at 23:40
  • @C.W.HolemanII Apparently. But that's still not at all clear from the question, even though it seems like my answer does it for you. – mattdm Feb 07 '13 at 16:57