PDA

View Full Version : Small Problem: List Directory in DOS-type



floschi
09-20-2005, 01:02 PM
Helllo guys,

im searching for the correct linux command, listing directory contents in iso9660 type. so that long names are converted to 8.3 format.
Any ideas? Please help. I've already done it .. but that's long ago. I think there's a quite simpel solution. :lol: :roll:

Cuddles
09-20-2005, 02:33 PM
floschi

You can always use the manual pages, to get help for most of the commands...

Like this:
man ls

my personal favorite ls command is:
ls -la

( which, will list out the contents of a current directory, in long file format, and all files - this includes files that start will the dot, or period )

If you prefer not to see the (dot) files, then the command would simply be:
ls -l

To add the recursive listing of folders below the current folder, use the following:
ls -lRa

( note the upper case R in the options on the command line )

Lastly, to get a listing of a folder that is not the current folder, append the path to the end of the command... Like this:
ls -lRa /etc/init.d

Hopefully, this helps,
Ms. Cuddles

angor
09-21-2005, 06:45 AM
<humor>
Below code should help (needs mods I don't have time for now):
ls -1|perl -pe'index($_,".")>6?s/([^.]{1,6}).*\./$1~1./:$_;s/^([^.]*).(...).*$/$1.$2/'
</humor>

Sorry, could not resist ;-)
--
$ To set up this Linux system, do I really have to type long, cryptic, frequently inconsistent
and undocumented commands with occasional long strings of hex digits?
# Yes. Do you have a problem with that?