vendredi 30 janvier 2015

What port uses my backportpackage or bzr?


I am working in a company what uses Ubuntu Precise on the desktops behind a proxy. The Proxy is available in /etc/environment and set as: http_proxy, https_proxy, ftp_proxy, no proxy and their uppercase versions.


So actually i have a problem with using some applications inside the Bash. If i'm using backportpackage (like backportpackage -s trusty -d precise fop) or bzr branch then just comes up a timeout.


Now i'm guessing that the programs trying to use an unsupported (from Proxies Firewall) Port. But if i can find out what port it uses, i can ask the Admins for opening the port.


May anyone can help with this?



read first element in array



defaults read -g AppleLanguages


produces something like this:



(

en,

de

)



I'd like to extract just the first element, in this case "en",



defaults read -g AppleLanguages | awk '/\(/ , /,/'


but awk always includes the search patterns. What can I do to produce just "en"?



Unable to delete files via FTP?


I have a couple of FTP users who can access my (pseudo) server running vsftpd under Mint Linux. They are restricted to a specific directory and below via chroot(). Whilst they can access the files without problem they are unable to delete them when they are no longer required. The permissions on their base directory, and all sub-directories is 'drwxrwxrwx' and all files '_rw_rw_rw_'. I have searched the web but been unable to find an explanation.



traceroute / mtr from multiple locations, How can we do it ? (Or alternate way)


I have a website, recently due to some network issue, Most of my customers are reporting slow loading time of my website.


When I reported this to my DataCenter, they are asking me to send the ping / tracert results from various IPs, Which is very difficult to do it. If 100s of customers are visiting my website for buying, I can not ask them to send the tracert to use my website. That is impossible.


We have changed the web application in such a way that, We are able to capture the website's loading time & client's IP.


date / loading time IP location



30 04:59:51 - 1.785 - xx0.61.30.xxx Mumbai

30 05:00:29 - 3.218 - xx4.79.168.xxx null

30 05:00:37 - 54.399 - xx2.41.204.xxx null ====> Loadtime is high

30 05:03:05 - 3.153 - xx2.174.249.xxx Chennai

30 05:03:48 - 70.231 - xx2.41.204.xx null ====> Loadtime is high

30 05:04:01 - 3.911 - x.22.89.xx Bhandup

30 05:04:34 - 1.282 - xx2.174.xx.221 Chennai

30 05:05:17 - 2.837 - xx.177.xx4.196 Delhi

30 05:05:31 - 1.354 - xx2.177.xx4.196 Delhi

30 05:05:55 - 4.177 - xx2.167.xx.87 Bangalore

30 05:06:49 - 7.265 - xx.96.xx.180 null

30 05:06:55 - 5.539 - xx7.xx.65.19 Bangalore

30 05:08:05 - 1.465 - xx3.x3.50.82 null

30 05:08:26 - 1.822 - xx2.xx6.58.195 null

30 05:09:10 - 0.757 - xx2.xx.58.195 null

30 05:10:23 - 5.865 - xx6.xx.136.220 Bangalore


Now, How can I find the solution to this problem ?


If I do a traceroute to the slow loading IP address from my server, there are some problem noticied in mtr or traceroute. Will it help in resolving the issue by my DataCenter ?



How can I block outgoing ARP traffic?


My server keeps sending ARP requests and my provider is not happy with this. To find out the reason I would like to block all outgoing arp requests (so that my provider doesn't block my server again) and terminate one by one all processes to find out which one is doing this.


How can I block ALL outgoing ARP traffic (maybe using arptables)?


I am running Debian 7.



Bash escaping is confusing me


Lets say that I have a file (executable) called literally 'a\b'. It just echoes some stuff. Now I want to call that and I can do it by inputting



user@machine:~/test$ ./a\\b


into my console. Now lets write this into a variable



user@machine:~/test$ COMMAND="./a\\b"


and now I want to execute this file 'a\b' by using backticks. Here is the result:



user@machine:~/test$ `$COMMAND`
a: command not found
user@machine:~/test$


So, here is my question: How can I make this work?


Ive tried numerous ways and played around with '' and multiple backslashes in COMMAND but nothing worked...


** I know its senseless but I just want to know how bash and `` work together to interpret things... **


THX


FW



Change of voice via ffmpeg or other application


I have a set of vioce files, I need to modify them so that user can't know speaker of voice....

Do you know same appication ?