How to recursively download a folder via FTP on Linux

You could rely on wget which usually handles ftp get properly (at least in my own experience). For example: You can also use -m which is suitable for mirroring. It is currently equivalent to -r -N -l inf. If you’ve some special characters in the credential details, you can specify the –user and –password arguments … Read more

How do I install chkconfig on Ubuntu?

The command chkconfig is no longer available in Ubuntu.The equivalent command to chkconfig is update-rc.d.This command nearly supports all the new versions of ubuntu. The similar commands are

How to install Android SDK on Ubuntu?

Option 1: The location of Android SDK on Linux can be any of the following: /home/AccountName/Android/Sdk /usr/lib/android-sdk /Library/Android/sdk/ /Users/[USER]/Library/Android/sdk Option 2: Download the Android Studio. Extract downloaded .zip file.The extracted folder name will read somewhat like android-studio To keep navigation easy, move this folder to Home directory. After moving, copy the moved folder by right clicking it. This action will place … Read more

Curl : connection refused

I got the following error while running curl: curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused. It seems that it is easy to debug, but, I didnt find how to solve it. The adress 127.0.0.1 is mentioned in the file etc/hosts. I am using curl version 7.47 on Ubuntu system. Anyone has … Read more

Syntax error near unexpected token ‘then’

There must be a space between if and [, like this: These (and their combinations) would all be incorrect too: These on the other hand are all ok: Btw these are equivalent: These are also equivalent: And, the middle part of your script would have been better with an elif like this: (I also dropped … Read more

Gedit command not working in kali linux terminal

Although I am not sure, what the actual error here is, but purging the package will help. You can try this After this try reinstalling with Moreover, you should Prefer AskUbuntu and SuperUser for such questions, you can expect a detailed and possibly faster response.

How to make rpm auto install dependencies

Create a (local) repository and use yum to have it resolve the dependencies for you. The CentOS wiki has a nice page providing a how-to on this. CentOS wiki HowTos/CreateLocalRepos. Summarized and further minimized (not ideal, but quickest): Create a directory for you local repository, e.g. /home/user/repo. Move the RPMs into that directory. Fix some … Read more

Is there an alternative sleep function in C to milliseconds?

Yes – older POSIX standards defined usleep(), so this is available on Linux: DESCRIPTION The usleep() function suspends execution of the calling thread for (at least) usec microseconds. The sleep may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers. usleep() takes … Read more

wget returns “Unable to establish SSL connection”

This is most likely due to a TLS version mismatch from client to server-side. Have a look here: Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS EDIT: Upon further digging into the problem, it could also be because of a wrong system time or an old version of wget.

What does set -e mean in a bash script?

From help set : But it’s considered bad practice by some (bash FAQ and irc freenode #bash FAQ authors). It’s recommended to use: to run do_something function when errors occur. See http://mywiki.wooledge.org/BashFAQ/105