The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Need some bash help

    Discussion in 'Linux Compatibility and Software' started by AuroraS, Apr 15, 2007.

  1. AuroraS

    AuroraS Notebook Virtuoso

    Reputations:
    651
    Messages:
    3,497
    Likes Received:
    0
    Trophy Points:
    105
    I've tried googling... but I'm still unsure about how I'd do this. I want to delete a folder in "/usr/share/", however that folder has permission issues.
    What kind of bash command would I use to delete a folder in there?
    I've tried
    Code:
    sudo rmdir /usr/share/FOLDER
    however it says that the folder isn't empty... so I can't delete it. Is there another command to use?... or is there an alternate way of deleting the folder?

    Thanks
     
  2. BigV

    BigV Notebook Deity

    Reputations:
    137
    Messages:
    890
    Likes Received:
    0
    Trophy Points:
    30
    sudo rm -rf /usr/share/ folder

    rm -rf = ReMove -Recursive,Force

    I've never even used rmdir... always just rm
     
  3. AuroraS

    AuroraS Notebook Virtuoso

    Reputations:
    651
    Messages:
    3,497
    Likes Received:
    0
    Trophy Points:
    105
    Thanks BigV! Looks like it did the trick.
     
  4. Gautam

    Gautam election 2008 NBR Reviewer

    Reputations:
    1,856
    Messages:
    3,564
    Likes Received:
    0
    Trophy Points:
    105
    Yep, no recursive, no fun!

    Also for future information, you might (may) want to try the shred tool. Fun stuff...

    Also, I don't think rmdir exists, if it does it isn't used because it isn't useful for some reason. You only get rm -r for folders.
     
  5. BigV

    BigV Notebook Deity

    Reputations:
    137
    Messages:
    890
    Likes Received:
    0
    Trophy Points:
    30
    rmdir might even just be a symlink to rm...

    hmmm, ok. the command actually exists, but it's only useful for removing empty directories. strange.

    yeah, rm only makes the entry in the filesystem go away, the data is still there until the sectors get overwritten. generally not a big deal, although I guess if you have confidential data or something you would want to use shred.

    oh yeah, you might want to add a "v" to the options for rm if you want to see cool scrolly text fly by! ;)

    sudo rm -rvf /foo/bar
     
  6. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    You've already got your answer, but I've attached a file that has 17 pages worth of UNIX bash commands. Enjoy. :)
     

    Attached Files:

  7. BigV

    BigV Notebook Deity

    Reputations:
    137
    Messages:
    890
    Likes Received:
    0
    Trophy Points:
    30
    .doc! boooooo! hisssss! ;)

    although the forum won't let you attach .odt :(

    on a side note, I just opened the file in O o_O, everything looked totally fine, then I saved it as opendocument and all formatting and tables looked ok.
     
  8. Gautam

    Gautam election 2008 NBR Reviewer

    Reputations:
    1,856
    Messages:
    3,564
    Likes Received:
    0
    Trophy Points:
    105
    Yeah, seriously, BOO...HISS.. - at least you could have used .xdoc. :p. Just kidding, I have a bunch of .doc files myself. You really can't completely ditch M$ formats in a Microsoft world. :(

    Should we convert those 17 pages into the bash command guide, since I seem to be too lazy to actually write one up? :D
     
  9. BigV

    BigV Notebook Deity

    Reputations:
    137
    Messages:
    890
    Likes Received:
    0
    Trophy Points:
    30
    sounds good... maybe make it into a pdf just to save face?
     
  10. Gautam

    Gautam election 2008 NBR Reviewer

    Reputations:
    1,856
    Messages:
    3,564
    Likes Received:
    0
    Trophy Points:
    105
    DO we need to change the writing to avoid plagarism? I don't think text falls under the GNU license :p. I don't think those have been taken directly from the MAN pages, and even if they did, is it ok to just take it?
     
  11. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    I don't know if it would be okay just to take it. You could try to get in contact with Tech Republic if you really wanted to, but seeing as how these are common commands that you could really get from any knowledgeable source, I don't see how they could really get you for plagiarism (unless they got hold of this thread anyway :)).

    Yeah, sorry it's in a .doc format. I actually got the file from school that we had as a resource, and that's the format it was in from them. I was going to transfer it to an odt file, but you can't upload those to the forum. And I didn't even think about making it a pdf...
     
  12. BigV

    BigV Notebook Deity

    Reputations:
    137
    Messages:
    890
    Likes Received:
    0
    Trophy Points:
    30
    Well, we could just find an equivalent that's under a free license... I've seen 'em before.
     
  13. Gautam

    Gautam election 2008 NBR Reviewer

    Reputations:
    1,856
    Messages:
    3,564
    Likes Received:
    0
    Trophy Points:
    105
    Look at how good I am at stripping away all traces that it was taken from another source :eek:

    But seriously, I don't think ftw should post this straight up. Maybe some edits? Then his thread can be a sticky...
     

    Attached Files:

  14. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    I think we could get Pita and Lysander in here to give some more feedback, as well as change around the descriptions. Basically, we could use it as a source, and then cite it at the bottom. Or, we could use a GNU versions as BigV suggested and then add to it/modify it as we see fit and not have to worry about it at all. Either way, as long as we cite the source, we really shouldn't have a problem.
     
  15. Gautam

    Gautam election 2008 NBR Reviewer

    Reputations:
    1,856
    Messages:
    3,564
    Likes Received:
    0
    Trophy Points:
    105
    Or we could just write it from scratch so its good material. I'm tempted to not be lazy...

    Lysander's still working on a Linux Install Guide.
     
  16. Paul

    Paul Mom! Hot Pockets! NBR Reviewer

    Reputations:
    759
    Messages:
    2,637
    Likes Received:
    0
    Trophy Points:
    55
    Well, either way is good for me. In a few weeks, I will back in school and out of my engineering internship (and hopefully my FSAE car will be done), so I should have some more time. Things are pretty hectic right now though.