I have two questions. First, which command lists files and directories, but lists directories first?
Second question: I want to copy a list of files into a single directory, but make the target directory the first filename in the command.
Listing directories first for a non-GNU
Note, this will list all the bunch of other weird stuff like symlinks, sockets and pipes as well (appropriately grouped, of course), but considering that stuff is quite rare that shouldn't be a problem. Otherwise the filter would be
The gnu version of
On systems that don't have gnu's
For copying files, with the target first, you would have to write a script that saves the first argument, then uses
If you were planning on using these together - that is, collecting the list from
An alternative tool for efficiently copying directory trees.
You might want to look into using