The tag has no wiki summary.

learn more… | top users | synonyms

38
votes
2answers
29k views

How do I pass command line arguments to Dock items?

I'm attempting to follow the instructions for pinning startup tabs in Chrome. On OS X how do I add command line arguments to items that persist in my dock?
36
votes
6answers
32k views

How do I start Chrome using a specified “user profile”?

I use the new built-in "Users" feature of Chrome to switch between Home/Work accounts easily. However, Chrome remembers the "last" user profile you had selected when launching new windows. This is a ...
27
votes
4answers
2k views

How to create a file which is named like a command line argument?

I was wondering how to make a file named as a flag, e.g., if I wanted to make a folder named -a, what commands would do the trick? I tried mkdir '-a', mkdir \-a, and neither worked. I'm on Ubuntu.
20
votes
2answers
4k views

How can I get a specific argument from a previous command in bash?

In bash, you can use !* to get all the arguments from the previous command. As an example, if you did cp /some/path /some/other/path and then did mv !*, the second command would be expanded to mv ...
13
votes
5answers
13k views

How do I find out command line arguments of a running program?

I'm looking for a tool or method to find out what command line parameters have been passed to a program, for example when it was run by another program (launcher-application scenario).
11
votes
2answers
63k views

How to start a program with command line arguments on Windows' cmd with 'start' command?

I need to start a program (virtual machine) in the background with a start command on Windows' 7 command line. Normally you would do this like that: start /b cmd yourprogram But I need to pass some ...
10
votes
2answers
520 views

Passing command-line arguments to a windows batch script

I need to create a windows batch script where I need to pass a few command-line arguments, the order of the arguments can be in any way but it should pick them up properly based on the argument name. ...
9
votes
3answers
1k views

Why are there short and long alternatives for command line options?

Most unixoid commands feature short and long alternatives for command line options, like ls -a and ls --all, or ls -A and ls --almost-all. Why do those two ways exist? One is shorter to type, the ...
9
votes
3answers
8k views

Passing two arguments to a command using pipes

Usually, we only need to pass one argument: echo abc | cat echo abc | cat some_file - echo abc | cat - some_file Is there a way to pass two arguments? Something like {echo abc , echo xyz} | cat ...
8
votes
4answers
709 views

Unix tools: what if a file is named minus something?

I'm always wondering: most GNU/Unix tools take options in the form "minus something", sometimes followed by an argument. What if you got a file named minus something? $ ls -f $ rm -f $ ls -f $ mv -f ...
8
votes
7answers
5k views

How can I use two parameters at once with xargs?

I need to convert videos but I don't know where are they, so I need to find them. How can I give the result and an output file name to ffmpeg with xargs ? I already find out that I can construct the ...
6
votes
2answers
13k views

What is the significance of the /admin switch in mstsc.exe?

What benefits/risks does the /admin switch for mstsc.exe confer? How is this different from logging in with an Administrator account, without the switch?
5
votes
2answers
171 views

Differences in bash scripts between $@ and $*

Which are the differences between $@ and $* ? For example I see no differences here: #! /bin/bash echo with star: $* echo with at sign: $@
5
votes
1answer
654 views

How to capture command line parameters for new processes?

I'm trying to capture the video conversion parameters passed onto the codecs in mediacoder to learn how codecs pass streams onto other codecs. I was wondering if there a program that captures the ...
5
votes
1answer
4k views

(How) can I change the time until the screensaver kicks in from the command line?

As the title asks (Windows 7). (How) can I change the time until the screensaver kicks in from the command line? Is it even possible? Normally I am happy with a 5 minute setting, but occasionally I ...
4
votes
3answers
27k views

Command line argument for running as another user on Windows?

Under windows .msi installer, if you specify a custom action to be run at an application's installation time, it will get run under the "SYSTEM" user. Can I trick it by passing a command line ...
4
votes
2answers
959 views

How can I tell Emacs TRAMP to use specific arguments to ssh?

I'm trying to set up my Emacs TRAMP to access remote files via ssh, and I would like to add some additional arguments to the ssh command that tramp uses for connecting. Is there a way to do this? I ...
4
votes
3answers
3k views

Linux “top -c” to show full command

What parameter can help me to display the full command using top -c? For example, I have one of the oupput from top -c 5073 mysql 20 0 298m 12m 4668 S 0 0.0 29:27.46 /usr/sbin/mysqld ...
4
votes
1answer
74 views

Recursive folder rename through command line

I have 500000 plus files in over 3000 directories and need to rename all folders called PHOTOS to Photos. I also need to Rename any Folders call Photos blah blah blah to be called just Photos. It ...
3
votes
2answers
3k views

7zip command line options for more information when synchronizing

In the 7zip command line options, is there some argument that can make 7z output the files ignored/deleted from the archive too? (files ignored by the option -uq0) Example call: "C:\Program ...
3
votes
1answer
464 views

Opening Folder Options window in Windows from the command prompt

If I need to open the Control Panel through the command prompt, it is enough to type control I need to open the Folder Options window through typing some command through the command prompt. Any ...
3
votes
2answers
983 views

taskmgr.exe called with an argument by Windows 7

So I noticed when I press Ctrl+Alt+Del and click Task-Manager, Windows calls taskmgr.exe /3 as command. Several websites claim the Task Manager has no command line arguments. Why does Windows ...
3
votes
3answers
504 views

Launch VIM and show, or hide, row numbers

Background Control whether row numbers are displayed after vim starts (in a non-interactive mode). Problem A shell script contains the following code: echo Converting $1 to $1.html... NUMBERS="-c ...
3
votes
1answer
39 views

Bash: optionally passing arguments to a command

I'm trying to add arguments to a command call depend on another variable. Please look at the shell scripting code: curl \ $([ -z "${title}" ] || echo --data-urlencode title=${title}) \ ...
3
votes
2answers
2k views

How to pass a filename by drag-and-drop to a shortcut in Windows

I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param ...
3
votes
2answers
781 views

Finding Command-Line Arguments of Programs

I know that unix has man pages, but is there a place I can look to discover command-line arguments of programs? Going to command prompt and typing notepad /? doesn't give anything.
3
votes
1answer
5k views

How to open multiple tabs in IE8 from the command prompt?

What command line options can I use for opening multiple tabs in IE 8 from the command prompt or a .bat file? I've tried the URLs separated by "", commas, <> and |, but nothing has worked.
3
votes
0answers
344 views

Shortcuts with command line arguments blocked with IE error - These files can't be opened

My local shortcuts (.lnk files) do not execute if the shortcut has any command-line arguments On freshly-installed 64-Bit Windows 8 Shortcut worked fine on Windows 7 32-Bit It depends where the ...
3
votes
0answers
430 views

Grouping shortcuts with different parameters in Windows 7 Taskbar

I have created many different windows shortcuts for pgAdmin.exe with the target database given as a command line argument. For example: "C:\Program Files (x86)\pgAdmin III\1.14\pgadmin3.exe" /s ...
3
votes
1answer
2k views

Execute local script requiring arguments on Linux via plink

Is it possible to execute (from windows) a local script with arguments on a remote linux system? Here's what I got: plink 1.2.3.4 -l root -pw mypassword -m hello.sh Is there a way to do this ...
2
votes
2answers
91 views

Why do many CLI apps take a “--” argument?

I've seen many command line tools that take a "--" argument. For example: gem install mysql -- —–with-mysql-config=/usr/local/mysql/bin/mysql_config What does it stand for? Does it have a special ...
2
votes
3answers
275 views

Using find, xargs, etc. to output similarly named files

I have a folder full of HTML files: 001.htm 002.htm 003.htm … I want to run Pandoc on them to convert them to similarly named Markdown files: 001.md 002.md 003.md This command works on one of ...
2
votes
2answers
1k views

How to set launch options for programs on OS X [duplicate]

Possible Duplicate: How do I pass command line arguments to Dock items? On a Windows PC, if I need to provide any launch options to an application (say, Chrome browser), I can do that by ...
2
votes
3answers
51 views

What's Linux test -a command test for?

Please take a look at the following code, snap=snapshot.file touch snapshot.file-1 $ [ -a $snap-1 ] && echo yes yes What does the test -a command tests for here? I tried info ...
2
votes
1answer
584 views

How to Retrieve Command Line Arguments

How can I view what command line arguments are passed to a running process on Mac OS X?
2
votes
3answers
277 views

Linux command line argument variations

New to Linux and have a few questions about command line arguments: Let's say there a command-line tool called widget that takes an argument called fizz. I've seen all different types of arguments: ...
2
votes
1answer
4k views

Passing Command Line Args to `open` on Mac

I am using the open command from the Terminal to open an app bundle and would like to pass a command line argument through to the underlying executable. Is this possible with the open command? The ...
2
votes
5answers
60 views

Nslookup command line with A record IP as sole output

I've found the following command to get your current public IP that works well from command line: nslookup myip.opendns.com resolver1.opendns.com I want to be able to run a command though that JUST ...
2
votes
2answers
221 views

Robocopy “modified”

Using robocopy on Windows 8 to automate backing up several different groups of files. It labels all of them as "MODIFIED" all the time though even if I just ran it and haven't touched the files. How ...
2
votes
3answers
352 views

matching start of the line in cygwin regexp

I apply sed 's/^ bug*/__/' to ref bug bug ref and get ref __ __ ref The same is responded for perl, perl -ni -e 's/^ bug/__/; print'. Sample file can be downloaded ...
2
votes
1answer
10k views

Pass a path with space to a batch file as a parameter

In first.bat, I use var5=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\ CALL scripts\vc64.bat %var5% And in scripts\vc64.bat, I use SET var6=%1vcvarsx86_amd64.bat CALL ...
2
votes
1answer
215 views

why do *NIX commands have such “insane” (counterintuitive) defaults (philosophical pondering)? [closed]

Why do most *NIX commands my (experience is Linux mostly and rare encounter with FreeBDS) have such "insane" (unintuitive) default, behaviours, i.e. VERY different from what the "equivalent" GUI ...
2
votes
1answer
1k views

Command line 7Zip to extract file by specified result path

Is it possible to make 7Zip extract one file by name from archive to specified full path (including new filename)? I've found only: 7zip e <archive> -o<resultDirectory> <filemask> ...
2
votes
1answer
523 views

How do you open mailx to read old mail when you have no new mail and view a list of old emails?

If you type mailx at the command line when you have new mail, it nicely shows you headers of your new mail and leaves you at a ? prompt where you can do mail commands. But if you don't have new mail ...
2
votes
1answer
152 views

use FFMpeg to send BMPs to stdout

I see lots of examples using FFMpeg to make a video file from a set of images. I can also see how to do the opposite if I want individual files. However, I want the images to be pushed to stdout. This ...
2
votes
3answers
1k views

How to add command line arguments to command line arguments in Windows shortcut?

I know I can add a command line argument/option to a shortcut this way; for example: "C:\Program Files\Internet Explorer\iexplore.exe" www.a.com So IE will connect to a.com when it starts up. What ...
2
votes
0answers
632 views

Chrome: How to refresh tab if open, otherwise open new tab?

I'm opening a .pdf file from the command line in Chrome (Windows 7 64 bit). Every time the pdf file changes open the pdf to view it, but I don't want Chrome to open it in a new tab every time. Is ...
1
vote
2answers
7k views

List files with path using Windows command line

My folder structure in a drive is like this (in Windows): Folder 1 Fd1 Fd2 Fd3 Fd4 Fd5 Folder 2 Fd1 Fd2 Fd3 Fd4 Fd5 This arrangement continues for 100s of folders. Inside Fd1 of each ...
1
vote
2answers
52 views

How to take command line parameters from a file

I've got a file each line of which contains an URL. All those urls one by one need to be passed as a command line parameter to a certain program. How to do this?
1
vote
1answer
152 views

Pass an option syntax string as filename

I somehow got a file named --no-recursion in a directory. How can I get cat to show what it contains? Not like this, since the argument gets interpreted as an option: root@nagini [/home/lalilulelo]# ...