Programming :: Downloading A List Of Files From A Remote Server Using A List?
Feb 10, 2009
I am trying to get this script to work. The purpose is to download a list of modules from the slax.org the list consist of a list of module numbers. What I am trying to do is Download the file or the file name corresponding to the number in the list.the list is comma delimited. this is what I have done so far and I am a stand still.
#!/bin/sh
# Wget script to retrieve modules from slax.org modules
#
# ----Begin of user defined values -----
# Path to wget
How would I list 4 users ID numbered 10, 11, 12 and 13 from my users list and output them to a file busers where their names are numbered by ascending order? How would I accomplish that on a one line command?
I'm trying to list installed packages on a remote server. I don't see a way to do this with either yum or rpm.In particular, I'd like to list installed packages on a remote server, and list only those packages installed from our own repo
I am an uploader to a various hosts, so this tiny script me a lot. I make a rar archive and split files with 100mb. I could get 3-4 or even 76 parts of rar files and it would take me some time to paste all these urls to remote upload function of filehosting sites. For example:
Code:
server:/home/cober/downloads/teevee# ls -al total 358784 drwxrwxrwx 2 root root 4096 Dec 8 19:38 .
Is there a way, preferably in python or BASH, to rename files from a list? for instance, track1.mp3, track2.mp3 should be renamed to the names stored in a file listing song names. I have tried to loop a variable through directory listing and renamed them, only to find that filenames with spaces can't be assigned to a variable as a whole. To solve the problem above, I have tried the read command in BASH, which enables the program reading line by line from a list. However, It was failed to pipe the results from directory listing to the read command.
I need to, through a bash script, go through a given directory (given as argument 1) to list out the relative path in this directory (including $1) for eact subdirectory which contains files. Directories which only contain . .. and eventually only subdirectories SHALL NOT be listed. It is this last requirement that makes it difficult for me.
I have been using the tree command for now, but I have not found a way to ignore paths to directories which only contains other subdirs or nothing at all in any easy way. I may offcourse test each directory after they are listed but this gives an extra loop to go through and I beleive it should be possible to do it directly when creatring the list. I guess by using find or ls in conjuntion with the tree command or by itself it should be possible but I am not to conversant of nested script commands.
How to build a list of files under a directory that may have any permissible characters in the name, that is anything except NUL? The only possible (?) bash data structure to contain a list of such names is an array because NUL cannot be used as a list item separator so no X-separated list can safely be used; there is no "X" that might not be part of a file name. OK -- but how to populate such an array? Here's what I've tried.
Code:
#!/bin/bash # Set up test files dir=$(mktemp -d "/tmp/${0##*/}.XXXXXX") touch $dir/foo $dir/bar
I've got a problem with a piece of code. Basically, I use my listRegularFiles function in two separate places in my code. The first time I run itit appears to work perfectly well. If I use it a second time, however, it blows a gasket. I'll post my code below, and if anybody has any ideas,Here's the code for listRegularFiles:
For some odd reason in wheezy it's not downloading the packages in the 'all' architecture, this leads to interesting issues when it comes to things like installing chromium and other packages that aren't built for one particular architecture. I've only noticed this in wheezy, and i'm not sure if this is normal. If there is any easy way to fix this, I'd be more than happy to hear.When i try to do an apt-get update, it only downloads from amd64 and not all. I've tried the mit mirror, and also the one shown there or well the default one but it still doesn't seem to be working right.
AKA "zipping on the fly .. the slow-as-molasses way." The list includes full pathnames to each file, and they're all in subfolders of the same parent folder (which, unfortunately, is not the root folder of the drive or system on which the files reside). A cleaned-up and radio-ready portion of the list looks like
What I'd like to be able to do is zip all the files in the list into a single archive, to avoid the step of having to copy them to the same location (presumably another folder on the HD) and then zip that folder. I'm more inclined to make provisions about extracting to a single folder at some other time. Is this possible in BASH, or would I have to consider a faster, more robust scripting language such as python or perl?
I want to make a program that maintains a list of tags that can be attached to a set of files. Store the tags in the files. The main problem is that there is no way to get a list of all the tags without reading each and every file. And also what if you have an unused tag? Have a file that contains tag "keys" and file list "values". This seems like it would be fast and effective, but what if one of the files gets renamed?
config my apache server to list all my files: c/c++, php, java files, like the txt file on my server, e.g /var/www/mydomain/pub i want to dump all my c/c++, php, java file under the pub directory and I can access it from my domain name, if I dump txt file, I have no problem to view it, but when I dump c/c++ or php files under pub directory, then I can't view it like regular txt file, Q: is there anyway I can configure my apache server to view all the c/C++, php, java file as like txt file?
I tried to change the basic toolbar to cairo dock,a tutorial that i found told me to write in terminal gksu gedit /etc/apt/sources.list.d/winehq.listso i write it and a window opened,i couled not find the text that told me(the tutorial i mean)so i closed the window,after that i keep taiking the same error
E: Type �sudo� is not known on line 55 in source list /etc/apt/sources.list E: The list of sources could not be read. Go to the repository dialogue to correct the problem. E: _cache->open() failed, please report.
now whene i got in the winehq.list the text has gone and i take this error in update manager,my software center doesn't work and my terminal whenever i type sudo commands says
E: Type �sudo� is not known on line 55 in source list /etc/apt/sources.list
All I want is for my bootloader to show "Ubuntu" & "Windows XP" which are the only 2 OS's I have installed (dual booting). At the moment it shows Windows XP, Ubuntu, Ubuntu recovery mode & like 2 more.. which are also Ubuntu & recovery mode. I've never selected the other Ubuntu ones, only the first one. So, how can I remove the ones I don't want to show on the list.
There is a problem with my source list (apparently) I'm running 11.04 if that helps.When I try to use apt-get install update for example, I get: "Malformed line 59 in source list etc/apt/sources.list"The same error occurs when trying to access synaptic package manager, it tells me there is a malformed line and the list of sources cannot be read.This error prevents me from apt-getting anything, updating and i suspect it is affecting the software center too.
I understand there is a file that stores the repositories' information, but I can't find it!Is there a way I can create a list of what applications have been installed?The idea is that if I am running a backup, finding a way to save the repository list and applications installed so if I am upgrading, or fixing a borked system by re-installing Fedora, I could copy the repo list back, and run the applications list like ode:yum install <cat apps.txt?> and get all of the applications I've installed via Yum without having to remember them all?Is there anything else, outside of /home, I should look at backing up? SELinux settings?
I am working for a community where several people are engaged for 4 different development projects. we are planning to have a samba server to store our data.Now the problem is that I have created a share in which @groupa, @groupb and @groupc are allowed to read and write. But three of the members of @groupb are only allowed to for read permission only.