i have a java program and to run it, i have to go into terminal and typecd <where the file is>java -jar <filename>.jarthis works fine, but is there a way to make a shortcut/small program to do this for me when i double click?
I want to do something like svn add dir1 dir2; svn ci dir1 dir2 but have it be only 1 revision. Is there a way to do this? Is this the correct way to add new folders (with contents) to the repository? We are restructuring the trunk, so I cleared it out and plan on putting these directories with their contents in it.
if I open a terminal and hit [TAB] [TAB] it will display "Display all 2583 possibilities? (y or n) ". If I press y is there a way to capture the output and write it to a file? Not like it is a command so I can't just use a redirect to a file? If not I guess I could just do an ls on all locations of $PATH and capture that to a file.
List of 77 lines with the names of movies. For ease, let's say it's in a text file. What I want is a command line argument I can pass that'll read each line and pick one of those 77 lines at random, except I can't figure out how to do this. Is there a program I can just pipe the output of 'cat listofmovies.txt' to?
I've just started experimenting with SSH tunnels. I wanted a way to connect to MySQL on our website VPS but wanted the connection encrypted rather than just using PHP's mysql_connect() function and connecting to the remote IP. This seems to be working great. I'm also looking into autossh to make sure that the tunnel gets reconnected when it drops.is there a command/utility that can list the currently active SSH tunnels? Be great if there was a way of terminating an active tunnel through a command as well. Or is it a case of manually digging through the process list and killing the specific PID like I have been?
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.
Is there any Linux application for finding the folders with the most number of files? baobab sorts folders by their total size, I'm looking for a tool that lists folders by the total number of files in it.
The reason I'm looking is because copying tens of thousands of small files is excruciatingly slow (much slower than copying a few large files of the same size), so I want to archive or delete those folders with high file counts that that will be slowing down the copying (it won't speed things up now, but it would be faster when I need to move/copy it again in the future).
This is a really odd bug I can't seem to figure it out. Basically, commands like ls can see all the files in the current directory, however when I go to execute the file it will give errors like "file not found", even when it most obviously is. If you look at my command history in the screenshot, you can see I can ls into a directory and see it's contents. When I try to run the file, I get the "no such file or directory" error.
However, if I type simply 'vm', I can't use tab completion to complete the directory name, and my third command is me typing 'vm' and hitting tabtab, it lists a bunch of vmware specific tools instead of the subdirectory name. I can then ls and see my current directory contents, and it will list only the single subdirectory. However, then I tried to use the full filepath from root to run the file, still to no avail. If anyone has any insight,
is there any way I can pass commands to the CLI of a tool directly?
I would like to script some actions, for example:
./OpenBTS < "tmsis"
I do not need to retrieve the results (I watch it in the log file). how I could realize that? There is now way to do this using command line parameters, at least not that I found out. So it looks like I have to figure out sth myself. Maybe I could automate screen in a way to detect the prompt and "paste" my command there. Are there tools for this on Linux?
i am working on some kind of PBX and i have list of telephone numbers inside a file, i have to insert these numbers into the correct command and then telnet to a remote server and execute these commands. i can read the telephone numbers and insert them into the command with no problem, but when i try to insert these commands into the send i face problem. here is the basic code
i can make external loop inside the Bash which read the input file and issue the command and then telnet and execute, but this will make the script connects and disconnects again for each line which cause high load on that server and hardwar problem. i am wondering if there is an option inside the expect interperter which makes the send read directly from a file... somthing like this:
I'd like to add custom startup commands (for example starting a process, registering to a registration server, downloading a configuration file) to the Linux startup process. Those commands should be triggered on startup only. What is the standard/appropriate way to do this?
EDIT: Is /etc/profile the right place to trigger such things?
I wrote a simple bash script to let me treat any set of programs like a deamon. For example if I configure the script a certain way I can start/stop/get the status of apache, mysql and php all from one command. I am having a bit of a problem though. I am passing commands as strings to a function and then depending on the arguments to the script it might run one of these commands or another. Some of these commands need to beun in the background though, such as deluge-web. When I send "deluge-web &" to the function and it execute it deluge-web does not start in the background. I can't figure out why this is. I have tried escaping the & with ''s and with a , but nothing seems to work. I know that this is some idiotic thing that I am overlooking, but I am a bit stumped. Here is the script configured to start/stop/get status of deluged and deluge-web.
tab-completion indexes system folders (like /usr/bin, /usr/local/bin)! so say i'm in a folder that has two files, 'text' and 'myprog', i type in an 'm' then tab, and i get hundreds of results including 'mysql', 'mysqlconfig', and others as im sure you can imagine. is there a way to set it to default or something else that will only make it index the current folder?
i tried changing my PATH variable so i could execute programs in the current directory without './' - what i added to PATH was ':.' at the end (apparently this is not the way to do it... :S). i tried resetting PATH various times ('unset PATH', 'PATH=$whatever...') but this has not fixed the problem. using 'unset PATH', of course, removes everything from PATH, which meant that functions (like 'ls') in /usr/bin and /usr/local/bin can't be found. obviously i want those to be found, but i would rather not tab through them!
Any script to categorize folders with similar name into one directory. For example: There are 4 directories named LinuxFedora, LinuxUbuntu, WindowsXP and Windows7. The script should be able to create two folder named Linux and Windows wheree respective directories are moved.
Next example: If there are many folder as below: DevLys 010 DevLys 010