Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here

Deo Favente

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Deo Favente

  • Rank
    New Here
  1. cp question [solved]

    Well what do you know. I tottally forgot i do have another chance to try it! But this time i have 4 levels between the top and the abc, def, ghi folders. So i tried my idea and it didnt work. It printed out "cp: omitting directory " then it listed all the directories that matched, and at the end it printed out "cp: cannot stat */*/*/*/jkl" cause it didnt match any folders. I also learned that all the second level folders were named the same thing cool. So then i tried cp -R */xyz/*/*/{abc,def,ghi,jkl,mno} usr/somedirectories/lib/ and that worked yay! I hope i remember to prepend [solved] to the topic title.
  2. cp question [solved]

    Hi, i have a question on how to use the cp command. I already comepleted the job, but i would like to know how i could use cp to shorten what i did so i could learn how to use it next time. So for work i needed to copy a bunch of files. This is what my directory tree looks like: there are 48 directories in level 1. The directories below don't always exsist in all 48 direcetories, but i want the directories abc, def, and ghi and their contents copied over to /usr/somedirectories/lib/ so that there will be lib/abc, lib/def, and lib/ghi. All files have different names (or should- there might be one or two human errors i can take care of manually, never know) so i want everything to merge, and there are plenty of duplicate folders and some folders might be empty. My current idea is cp */*/{abc,def,ghi,jkl,mno} /usr/somedirectories/lib/ does this work? what's wrong with it? I've already copmpleted the job so i cant try it on anything.
  3. noob bash question

    Thank you for helping me learn how to use wget i bet this will help later too. But now i realize i have two more questions: 1)How do i tell wget to not print out an output file? Or should i just do "rm wget-log" 2)How do i tell wget to stop after the window has been closed? is there any easy way of doing this? Edit: Actually i have 3 3)How can i see if a domain is available? This is my attempt is it correct? There are multiple mirrors, map_dl_mirror is the mirror wget -d -r -np -nd -A .pk3 $map_dl_mirror || echo "WGET failed downloading." Is there like a goto statement or maybe like some kinda loop i can put this in? Here is my entire function so far: #!/bin/bash function dl_maps { cat << .end Select your mirror: --------------------------- [1]1337-h4x0rZ [2] [3] [7] .end read dlmirror case "$dlmirror" in "1") map_dl_mirror = "http://h4x0rz.bounceme.net/Urban%20Terror/maps/" ;; "2") map_dl_mirror = "" "8") *) echo "Invalid option" dl_maps esac wget -d -r -np -nd -A .pk3 $map_dl_mirror || echo "WGET failed downloading." } Edit 2: Opps i miscounted there are only 7 mirrors i orginally had put the number 8. And mine's the best cause last week i had 186+ maps i have to check how many there are now. And i fixed the .end, i forogt it has to be all the way to the left.
  4. noob bash question

    i just tried this and i have two problems 1) i want to put all the files in whatever direcotry i am currently in, i tested this on my desktop and it puts them in h4x0rZ.bounceme.net/Urban Terror/Maps. Maybe we could get rid of the recreate directories. 2) i want to only download .pk3 files because when it does this it downloads all the possible .html files created when broswing the directory. If you go to my website and click on "name" to sort by name you will have a file named index.html?C=N;O=D
  5. noob bash question

    wow thanks that really shortens up my code, thanks
  6. noob bash question

    Automatically download all the files ending in .pk3 in http://h4x0rz.bounceme.net/Urban%20Terror/maps/
  7. Hi, im new to linux and i wanted to make an install script to automate the installation of a game, but i have no idea what bash is. I was wondering if someone could help program two sections of the code i need. That would be great because the rest of the script is the same thing almost. First the script checks if the user is root or not, b/c this is where the game is installed if [ `id -u` != 0 ] then destpath="${HOME}/Games/UrbanTerror4/q3ut4" else destpath="/usr/local/games/UrbanTerror4/q3ut4" fi (this is all i can code so far) then it downloads all the files ending in ".pk3" at this location: "http://h4x0rz.bounceme.net/Urban%20Terror/maps/" to the destpath location on the user's computer, WITHOUT overriding any files. This is what i currently have that does the same job but is more manual: cd ${destpath}/q3ut4 maps_dl_url="http://h4x0rz.bounceme.net/Urban%20Terror/maps/" wget - c 'http://h4x0rz.bounceme.net/Urban Terror/maplist' maplst=`cat maplist` for map in $maplst; do ${wget_bin} ${maps_dl_url}/${map}.pk3 done rm maplist This sucks cause i have to update the text file manually.
×