Re: script to remove dot-files

From: Pål Monstad (pal.monstad_at_pm-data.no)
Date: 02/01/05


Date: Tue, 1 Feb 2005 17:05:07 +0100


"Thor" <thor@valhalla.bbs.org.nz> skrev i melding
news:ctndle$e40$1@lust.ihug.co.nz...
> Chris F.A. Johnson wrote:
>
> > On Mon, 31 Jan 2005 at 22:22 GMT, Bill Unruh wrote:
> >> Chris Tunnell <insert_last_name@mail.utexas.edu> writes:
> >>
> >>
> >>>Why do you need a script? I just rm .*, you get an error but so what?
> >>
> >> That is pretty awful. That includes the directories . and .. Ie it
could
> >> totally land you in the soup.
> >
> > Of course it won't. If you do rm on a directory, you will be told
> > that is it's directory and you cannot rm it. (You can with rm -f,
> > or rmdir.)
> >
> >> To do . files you MUST do
> >> .??*
> >> at least. That makes sure that the . files are at least 3 letters long
> >> (unlike . and ..)
> >
> > Not necessary.
> >
> >>>Pål Monstad wrote:
> >>>> I need to remove a lot of hidden files (dot-files) form /home. Anyone
> >>>> who knows about a script to do the job?
> >
>
> I wonder why you would want to do that at all. Are you trying to write a
> script that will trash someone else's system, I certainly can't see the
> point of doing it to your own.

The reason is simple. I run Samba with several hundred users, and each user
is auto generated from a script. I forgot to remove the default files in
/etc/skel, so the files where copied to each users home directory. As Samba
users on Win machines they don't need the dot files, and they never log on
to a Linux machine.

--
Pål Monstad


Relevant Pages

  • SMB.CONF without plenken
    ... # This is the main Samba configuration file. ... # unix names. ... # add user script delete user script etc etc ... # Each logon script should be stored at the base of the share. ...
    (alt.os.linux)
  • smb.conf for DOMAIN LOGONS , PASSWORD CHANGES ETC
    ... # Sample configuration file for the Samba suite for Debian GNU/Linux. ... # unix names. ... # add user script delete user script etc etc ... # Each logon script should be stored at the base of the ...
    (alt.os.linux)
  • Re: Help Needed configuring Samba on Webserver
    ... > with Apache and Samba installed. ... > to be able to do is to have each student have their own directory on the ... Sounds like a good job for a script, but I think you can save yourself ... You can specify all sorts of parameters with "useradd" ...
    (Fedora)
  • Re: "Torn between two OS" - Solaris vs Linux
    ... From a Windows machine as client, ... > I thought that someone had built Samba for Solaris. ... the Linux machine sees it as any local directory. ...
    (comp.os.linux.misc)
  • Re: Is it share a printer on a dual boot system transparently using samba?
    ... ISP's wireless router/modem connects both machines to the internet. ... Is it possible to configure samba using the names I used for the computer and printer in Vista such that to the XP machine it is looking at the same machine whichever I am booted as? ... I am new to Samba and Swat and could not seem to get this to work, although I did get the XP machine to see the Linux machine as in it's workgroup. ... I don't use windows myself, but I have configured a few winboxes ...
    (alt.os.linux)