Announcement

Collapse
No announcement yet.

Owning a Unix Administrator

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Quoth earl colby pottinger View Post
    What happen if someone tells this idiot to type in "rm -s *.*" ?
    Actually, nothing will happen. Proof:
    Code:
    marvin@vmsrv2:~$ cd tmp
    marvin@vmsrv2:~/tmp$ ls
    marvin@vmsrv2:~/tmp$ touch test
    marvin@vmsrv2:~/tmp$ rm -s *.*
    rm: invalid option -- s
    Try `rm --help' for more information.
    marvin@vmsrv2:~/tmp$ ls
    test
    marvin@vmsrv2:~/tmp$
    The "-s" is a flag that I can't find for any version of rm on any system. Which platform/version is it for?

    Also, "*.*" will not match every file on a UNIX/Linux system, it will only match files that have a "." in their name. End result is that the destruction is far less complete than it should be.

    Quoth JLRodgers View Post
    I love the rm command -- I use it all the time over using a FTP program to delete folders.

    FTP folder takes 1-10 minutes, rm takes 0.002 seconds (according to the logs lol). But "uptime"? I, having never heard it as I've had no need for it, would assume it displays the computer's uptime.
    Simply put, this makes no sense. FTP can be used to delete files (provided your login on the FTP server has that permission), but is used primarily for getting and sending files to/from a remote machine. rm is used to destroy those files. Honestly, I have no idea how/why you're using these terms like this.

    Quoth Chromatix View Post
    Yep. Among other things.
    tsk,tsk,tsk Chromatix. Using a password and allowing root to login doing so? Switch to a keyfile, disable password logins, and use sudo for root access. Highly recommended.

    Plus, you get to do stuff like this:
    Code:
    marvin@vmsrv2:~/tmp$ ssh vmsrv ud -d
    - Uptime for vmsrv -
    Now  : 126 day(s), 04:29:43 running Linux 2.6.25.1-1.0-vmsrv
    One  : 126 day(s), 04:28:07 running Linux 2.6.25.1-1.0-vmsrv, ended Fri Dec  5 22:39:01 2008
    Two  : 102 day(s), 10:51:08 running Linux 2.6.17-2-amd64, ended Sat Mar  8 19:28:39 2008
    Three: 96 day(s), 12:28:59 running Linux 2.6.17-2-amd64, ended Mon Jun 18 19:12:41 2007
    marvin@vmsrv2:~/tmp$
    Oh, and ud helps you keep track of your longest uptimes. I'd be doing better on that right now if my power supply hadn't died about 6 months ago, and the replacement flaked out a few times on me, too. Ah well.

    Comment


    • #17
      Quoth Pedersen View Post
      Simply put, this makes no sense. FTP can be used to delete files (provided your login on the FTP server has that permission), but is used primarily for getting and sending files to/from a remote machine. rm is used to destroy those files. Honestly, I have no idea how/why you're using these terms like this.
      Oh it can delete the files, it just takes 1-10 minutes to do so depending on the file count. It executes:
      rm "/home/.idiom/username/website/subfolder/subsubfolder/filename.ext"
      for every single file (and executes a list command to be able to parse the entire subfolder structure to make sure it can type it for every single file -- even if I say "delete the subfolder and all files within" When an update to some software packages (such as wordpress) involves hundreds-thousands of files that have to be deleted..... it takes a lot of time. So if there's 1000 files, it executes the rm command 1000 times, and the command to list things as well.

      Of I can just login and navigate to the web folder and type "rm -r subfolder" and be done in a second.

      Comment


      • #18
        Wrong OS

        Quoth Pedersen View Post
        Actually, nothing will happen.

        The "-s" is a flag that I can't find for any version of rm on any system. Which platform/version is it for?
        BeOS, but you are right it should have been '-r' !

        My MS-DOS and AmigaDOS roots are showing.

        However, I think the reason I have seen it posted before as *.* is not because that is what you want to do on a MS-DOS system all files. But rather because it will tend to wipe out on a Linux/UNIX system a subset of key files without making it obvious what happened.

        I could be wrong there too.

        Comment


        • #19
          fun with rm

          The fun I had with rm was to create a job (at now+1 year rm -rf /) when I logged off

          the job was destroyed when I logged in

          (before any of you cry foul, it was a training network, not connected to anything remotely useful)

          From a source inside the training department, managers were mystified when the system vanished 1 year after i had been let go

          Comment


          • #20
            Quoth MadonnaC View Post
            The fun I had with rm was to create a job (at now+1 year rm -rf /) when I logged off

            the job was destroyed when I logged in

            (before any of you cry foul, it was a training network, not connected to anything remotely useful)

            From a source inside the training department, managers were mystified when the system vanished 1 year after i had been let go
            We got to do that at a training class when the company I worked for brought in a SAP system that was all UNIX based. We had to attend a couple of classes to know how to get around in the environment.

            As the very last thing we did in class, because the systems were going to be re-imaged after we were done with them (in preparation for the next class), we got to rm -rf / on them and watch them die slowly.... It was kind of cool, and scary at the same time.


            Eric the Grey
            In memory of Dena - Don't Drink and Drive

            Comment


            • #21
              Well on a lighter note, when I'm trying out odd network setups on remote location machines, I first setup an AT job 10 minutes from now to reboot the system (or run /etc/init.d/network restart) and I try the setup with scripts before writing it down to config files... it has saved me from emergency trips quite a few times
              I pet animals, I rescue insects, I hug trees.

              "I picture the lead singer of Gwar screaming 'People of Japan, look at my balls! My swinging pendulous balls!!!'" -- Khyras

              Comment


              • #22
                Quoth Bliss View Post
                Well on a lighter note,
                We were on a dark note?
                I AM the evil bastard!
                A+ Certified IT Technician

                Comment


                • #23
                  Quoth Geek King View Post
                  chmod 000
                  Hehe. My junior year in HS, the entire Intro Java class knew and exploited that command. I nicked my neighbor's TicTacToe program when I couldn't figure out how to fix mine and the code looked exactly like his. Good times.
                  I am no longer of capable of the emotion you humans call “compassion”. Though I can feign it in exchange for an hourly wage. (Gravekeeper)

                  Comment


                  • #24
                    Quoth jedimaster91 View Post
                    TicTacToe program
                    I created one of those once... when I put the computer into "play against self" mode (basically the user's spot was picked "randomly") -- the computer started to cheat around game 20-50. Instructor looked at the code, even followed it line by line as it was running. No one had won. No code was running. Computer put an X drew a line and said "I [computer] won" -- without a single line of code being executed to do it, the computer even altered where the X was put which at the time all locations were hard-coded into the code.

                    Comment


                    • #25
                      Quoth JLRodgers View Post
                      I created one of those once... when I put the computer into "play against self" mode (basically the user's spot was picked "randomly") -- the computer started to cheat around game 20-50. Instructor looked at the code, even followed it line by line as it was running. No one had won. No code was running. Computer put an X drew a line and said "I [computer] won" -- without a single line of code being executed to do it, the computer even altered where the X was put which at the time all locations were hard-coded into the code.

                      You weren't working on the Skynet project at the time, were you?
                      Lady, people aren't chocolates. D'you know what they are mostly? Bastards. Bastard-coated bastards with bastard filling. Dr Cox - Scrubs

                      Comment


                      • #26
                        Quoth Naaman View Post
                        You weren't working on the Skynet project at the time, were you?
                        Nope But it was strange all the same.... All I know was I decided never to create a simple game and let the computer play itself ever again.

                        Comment

                        Working...
                        X