Jump to content

Command line: write filenames to txt file


Recommended Posts

Hi,

 

I've got a directory with a lot of files.

How can I make a text file with the names of the content of that directory?

(It's easy but I forgot it)

 

Thanks

 

Jeroen

Link to comment
Share on other sites

the > can be used to send output from any command to a file (or device sometimes)

 

my fav thing to do on the AIX server we used for programming up at school (we connected to it from win machines with X-Win32) was:

banner [some text] > pts/x

x being the pts that a friend of my was logged into at the time....we got in trouble for this when i taught others how to do it, and they started sending crap to the teachers terminal which was being projected onto a screen in the front of the class. i.e.: "PELUSO ROCKS!" (her name was Dr. Peluso, obviously)

 

thankfully, they never sent anything vulgar to her screen, nonetheless, they changed permissions on it so we could no longer use it :-(

 

just a little anecdote that this post reminded me off...:lol:

Link to comment
Share on other sites

you would get a hell of a lot of noise coming out of your speakers, i would guess.

 

/dev/dsp is the digital sample and digital recording device (reference: http://www.guerrilla.net/reference/dsp/prog_dsp.htm)

 

you would be sending the mouse input out to the sound...so, most likely, moving your mouse (or maybe you wouldn't have to move it?) would create some sort of-most likely annoying-sound.

 

or would it get recorded? i'm not sure how > /dev/dsp would be translated by the dsp device....ok, aru, correct me :-) i confused myself...

Link to comment
Share on other sites

I'm not gonna try it tonight :lol:

 

but If it has to do anything I'm sure it should do what you've said

 

If you wish you can do harmless and 'pleasant' tests to your /dev/dsp with:

 

/dev/dsp < somefile.wav

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...