A simple example:
Let's say I have one alias being sourced somewhere as:
alias ls 'ls -o'
I'd like to have a second alias add on to this:
alias ls 'ls -a'
So that when I execute it, I'm really getting:
ls -o -a
Is this possible? Of course in the above example, the second overwrites the first.
Why would I want this? The first...
Recently, I've released an open-source class - wrapper of API functions available from one of the leading SMS gateway, which provides an HTTP-API access to send an SMS messages.
Now I want to make a custom command line utitity, which can be available for user anywhere in the command line, so he can send SMS just by running console comma...
Scenario: I have a directory on a server that hosts my website that contains hundreds of user-submitted images. I am creating a backup script that takes all the images from the directory and compresses them into one .tar.gz file. The command I have so far is:
tar -czpf /path/to/backups/my_backup.tar.gz path/to/images/
Problem: No inside ...
I'm in the process of updating my Symphony installation and I've been told to "run these MySQL commands" to complete the process. Funny thing... I have no idea how to do that. The commands I'm mean to run are as follows:
ALTER TABLE `sym_sections` ADD `navigation_group` VARCHAR( 50 ) NOT NULL DEFAULT 'Content';
ALTER TABLE `sym_sect...
If you have written a really long command, say cd /very/long/path, and then you do ctrl+c or ctrl+u (if the cursor is at the end), and then you realise that you want the command back, is there any way to get the full line back without re-typing. Is there any trick to change .bashrc so that bash_history keep track of keys pressed on the s...
Is there a Bash environment variable (say $CLIPBOARD or similar) that contains the current contents of the clipboard?
The specific example is to see the top 20 lines of a file whose path I have just copied into the clipboard.
Copy path with Ctrl-C
Switch to terminal
Type more , Ctrl-V
UPDATE: I'm running on CentOS 4
...
Hi all,
I'm looking for a solution to convert a set of files using the terminal and the command "convert" under linux. I can use "convert" for each file:
convert -quality 85 file.jpg file.jpg
But i'm looking for something like:
for each jpg do
convert -quality 85 $file $file
end
Can someone tell me, which command i can use?
...
Lately, I've often found myself wanting to run some command on the output of another command that has output on several lines.
For example, let's say I have a command that returns a number of file paths each on a new line and I'd like to delete all these files.
Is there a command that can help me do this?
...
Is there any command line trick to get svn to add in all the missing files from svn stat interactively?
eg, something like:
svn add --interactive
$ new file: file1.tmp (Add / Ignore) ?
$ missing file: file.tmp (Remove / Ignore) ?
EDIT:
If anyone knows of script that could achieve this that would also work.
...
I'm looking for a good way to automatically 'svn add' all unversioned files in a working copy to my svn repository.
I have a live server that can create a few files that should be under source control. I would like to have a short script that I can run to automatically add these, instead of going through and adding them one at a time...
Can you have tar travel to a certain direct and then tar files relative to that directory? All while using one command (tar)?
For example instead of doing
cd /home/test/backups; tar zvPcf backup.tar.gz ../data/
I could do something like
tar -g '/home/test/backups/' zvPcf backup.tar.gz ../data/
...
C:\Program Files\Java\jdk1.6.0_05\CoreJava\v1\v1ch2\Welcome>javac Welcome.java
C:\Program Files\Java\jdk1.6.0_05\CoreJava\v1\v1ch2\Welcome>java Welcome.class
Exception in thread "main" java.lang.NoClassDefFoundError: Welcome/class
Caused by: java.lang.ClassNotFoundException: Welcome.class
at java.net.URLClassLoader$1.run(Unknown...
See the title of this question. I want to play with the exception raised in the last command. _ didn't help me. Is there anything like that?
...
Hi folks,
i've got a pretty simple .NET console application. I wish to pass in some command line arguments ... nothing tough there.
Now, the kicker is, i usually have a LIST of items i wish to pass in, for one argument. In this case, a list of files. I'm not sure of the best way to do this.
eg. myapp.exe files=aaa.txt,bbb.txt,ccc.txt
...
I have a nightly executable that will run on a windows or linux server that will be downloading information from various web sources and one of those sources contains a JSON response. This executable will download the information and connect to a SQL server database to update the appropriate records.
I come from a C#, windows programmi...
I'm writing an in-house module to generate a small LaTeX PDF. Within the module, how do I use PHP to utilize the command line?
...
Hello,
Please, help me in: how to put a double command in the cmd, like this in the Linux: apt-get install firefox && cp test.py /home/python/, but how to do this in Windows?, more specific in Windows CE, but it´s the same in Windows and in Windows CE, because the cmd is the same. Thanks!
...
Sometimes I know a file is not so deep away, but a very dense sub-directory does not allow me to find the files I want easily.
Can find (or any other tool) look for files using breadth-first search?
...
I want to FTP some files across networks using Windows FTP command prompt and I want to retrieve the FTP parameters from registry keys I have already setup for another related application.
Is there a way to read these parameters in-line direct from the registry as passed values into the FTP command?
...
I have to variables and I want to find the value of one divided by the other. What commands should I use to do this?
...