Canadian Mac Forums at ehMac banner
1 - 15 of 15 Posts

·
Registered
Joined
·
2,812 Posts
Discussion Starter · #1 ·
how do I make one?? Trying to create a simple txt file which I can attach as a sigfile (I use Netscape News reader), and I seemingly cannot. Not in text edit or it MS Word it seems. I was able to in 9 though... anyone??

H!
 

·
Registered
Joined
·
2,812 Posts
Discussion Starter · #3 ·
Hmmm.... Thanks but is there a freeware vers?? not trying to buy it just for that.

h!
 

·
Registered
Joined
·
523 Posts
In Text Edit, go to the Format menu and select "Make plain text." Note that if you use text files a lot you can tell TE to default to txt over rtf in the preferences.
 

·
Registered
Joined
·
809 Posts
open a terminal and type this:

echo "this is the contents of my file" > myfile.txt

myfile.txt will contain the line "this is the contents of my file"

use pico to edit it if you like.
its easy.

the unix underpinnings of osx is here to stay.
explore and take advantage of it!
 

·
Registered
Joined
·
2,812 Posts
Discussion Starter · #8 ·
SK - thanks for the code. I know less than zero Unix and maybe I should start to learn. Where should I begin?? I'm not the coding fan at all. C+ drove me out in Uni and I have since not touched any of it. But I did read up once and noticed the + of knowing it...

h!
 

·
Registered
Joined
·
523 Posts
shhhhh sinjin I'm pushing my unix agenda again
Ooops, sorry SK! I'm new here


OK Ohenri, forget what I said above. First thing you need to do is restart your Mac while holding down apple+s.... ;)
 

·
Premium Member
Joined
·
7,066 Posts
I learnt how to use UNIX using 2 books, my Mac, and a lot of fooling around.

UNIX for Dummies, is a good all around book, but doesn't have anything Mac specific.

UNIX for Mac OS X, is an awesome book that pertains directly to Mac OS X. Although now with the changing shell in Panther, a few things might be done a little differently. Its also by Peachpit Press so there are lots of pictures/screenshots
 

·
Registered
Joined
·
809 Posts
He he he. Actually I'm all for using a GUI tool if it gets the job done faster/better/SAFER.

I've noticed people talking alot about permission problems, so before you sweat it out trying to "fix" somthing that aint "broke" here is a good one. Assume your short name is "skiddie" try typing these 2 commands in a terminal

cd /Users
find skiddie \! -user skiddie | wc -l

The number that comes back tells you how many files in the skiddie account are not owned by skiddie (I get 2 when I try this). Now take off the "| wc -l" part to get the actual file names.

find skiddie \! -user skiddie

I get:
skiddie/.xftcache
skiddie/Library/Caches/com.apple.FCacheClassicDomain

I don't know enough to say if this is a bad thing or not but I'd say if you found a bunch of .plist files then you might expect trouble from the application associated with that plist.
True?
 

·
Registered
Joined
·
523 Posts
Actually I'm all for using a GUI tool if it gets the job done faster/better/SAFER
I hear you. I love a good GUI, but OS X has unleashed my inner geek and now I find myself doing a lot of things at the command line or with scripts, be they the shell or Apple variety. It's a lot of fun and very satisfying. Still a n00b, though.

I like your script. I ran it and found a bunch of OroborOSX files that don't "belong" to me. I hadn't used that window manager since well before Apple release X11. Time to purge.

Cheers!
 

·
Registered
Joined
·
523 Posts
Just curious: what's unsafe about creating a text file using the GUI?
Probably nothing, but it should be noted that:

1. SK made this remark with respect to GUI vs command line tools in general, not text editors, and

2. The spirit of your question implies the reverse of what SK said. To paraphrase, SK said GUI's are great in cases where the command line equivalent might be slower, "worse" or dangerous.

An example to illustrate the point: unless you really know what you are doing it is better to drag a file to the trash in the Finder than to invoke the "rm" command in Terminal. The former allows you to recover from a mistake, the latter is less forgiving. Hence, the GUI is safer than the command line.
 

·
Registered
Joined
·
809 Posts
Just curious: what's unsafe about creating a text file using the GUI?
Nothing. I was making a general statement

I like your script. I ran it and found a bunch of OroborOSX files that don't "belong" to me. I hadn't used that window manager since well before Apple release X11. Time to purge.
Continuing the "skiddie" example...
If having run
find skiddie \! -user skiddie
you discover files you are sure you want to (and can safely) delete then add this piece o dynamite

find skiddie \! -user skiddie -exec rm -f {} \;

Before you actually do that, understand that "find" is passing a list of files to the "rm -f" command via the "-exec" option. With that in mind, test things out first by saying

find skiddie \! -user skiddie -exec ls -l {} \;

Once you are feeling cozy, replace the "ls -l" with "rm -f"

[ October 28, 2003, 01:12 PM: Message edited by: Script Kiddie ]
 
1 - 15 of 15 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top