Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'alphabetical listing' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
alphabetical listing
Authored by: zossimos on Jul 20, '02 05:01:48PM

I'm certain there is a way in the Terminal to copy and paste an alphabetical listing, I think to write the list to a .txt file? Anyone know?



[ Reply to This | # ]
alphabetical listing
Authored by: Anonymous on Jul 20, '02 06:17:56PM
Writing to a file: ls -ls > filelist.txt for long file info ls -1 > filelist.txt (that's -one) for just file names. Writing to clipboard: ls -ls | pbcopy for long file info ls -1 | pbcopy (that's -one) for just file names. Obviously, you can use any arguments to ls to get your preferred formatting.

[ Reply to This | # ]
alphabetical listing
Authored by: tripfactor on Jul 20, '02 08:19:58PM

http://www.apple.com/downloads/macosx/unix_apps_utilities/shellservice.html

ShellService is a service component — it provides functionality that other applications use.In the Services menu (under the application menu), ShellService adds an item called Execute Text. This item will be enabled whenever you have text selected in applications which support the service.

In other words, to get a dir listing into the mail app, just type "ls" highlight it and then select execute text in the service menu. No copy or paste needed. And because it works with any unix command output you can make the listing any format you buy using the command's options.



[ Reply to This | # ]
alphabetical listing
Authored by: BraindeadMac on Jul 22, '02 08:08:58AM
the undocumented pbcopy and pbpaste commands allow you to copy and paste to the clipboard. For instance to get a home directory listing:
ls ~ | pbcopy
This will place the listing of the directory into the clipboard and you can then paste into whatever application you want.

[ Reply to This | # ]
alphabetical listing
Authored by: snit on Jul 22, '02 09:41:12PM

I added the following to my .login (actually a file called .aliai which is sourced from my .login)

alias "DT" "cat >> ~/Desktop/DT.txt"

I can now have any command's output redirected to a file on my desktop called DT.TXT, appending any new text to the end of the file

If I do not want it to append to an old DT.txt that may already exist, I use the DTo command defined by the following alias

alias "DTo" "cat > ~/Desktop/DT.txt"

Either can be used as follows:

ls -la | DT

the secret is the "piping" through the DT ( or DTo) command.

I suppose I could enter this as a hint all by itself. :)



[ Reply to This | # ]