A command-line interface (or CLI) is a method of interacting with your OS or software by typing commands on your keyboard.

learn more… | top users | synonyms (3)

1
vote
4answers
554 views

Change permission to all files expect one directory in linux

hi is there any way to change all files/directories permission except one single directory in a 'single linux command'? Thanks.
0
votes
1answer
7 views

Can't run start-process command

I'm trying to run a command found in this answer. The command is start /w %SystemRoot%\system32\pkgmgr.exe /ip /m:Windows6.1-KB2506143-x86.cab Trouble is, it doesn't work for me. Indeed, it ...
37
votes
6answers
78k views

How do I restart Linux (Ubuntu) from the command-line?

Because of my problem with mouse-clicks being ignored in Ubuntu, I want to restart from the command-line. (I have an open Terminal, and the keyboard is not ignored.) How do I restart a computer ...
0
votes
0answers
10 views

Detect vga signals from command line

Currently I am working on Ubuntu 12.10. I am using vga2usb device for interacting with other vga devices such as monitors. Is there any command line utility or any specific command from which I can ...
2
votes
2answers
187 views

cp copying more than what is asked

I go with the following in bash cp -r "/wordpress/3.0.1/" "/mySite/" and the result is /mySite/3.0.1/ but I don't want nor understand why the 3.0.1/ appears in the target destination. What am I ...
1
vote
0answers
17 views

wc / cat command not found

I'm trying to run some simple bash script which uses wc and cat commands. The script fails with this: wc: command not found or this (after I commented string which uses wc): cat: command not found ...
0
votes
1answer
12 views

Using su with screen

When I am under one of my user-names, I can fire off, say, screen -S -p 0 -X eval 'stuff "say command"\015'. However, I cannot su username screen -S -p 0 -X eval 'stuff "say command"\015'; it ...
0
votes
0answers
6 views

How to hide cmd window of a Calibre Content Server batch script?

So I manage to be able to share more than one Server Content at the same time with the same PC. If someone want to know how can I do this, is easy. Make a batch script and put this: @echo off ...
1
vote
2answers
44 views

Batch command for Searching & Replacing Text in a Text containing non-TXT file

I am working with iMacro JavaScript .js files which are simple unencrypted lines of code-like text. The file contains the following code: var i; for (i = 1; i <= 10; i++) { iimSet("loop", i); ...
0
votes
0answers
10 views

Create user to execute select tasks

I would like to allow a application user to perform select sudo or root tasks without the need for sudo or root permissions or password being entered. Normal (Prompts for password): sudo appuser ...
9
votes
4answers
18k views

Uninstalling programs silently via CMD

Is there a way I can uninstall programs without the graphical interface and doing it via CMD?
0
votes
0answers
5 views

IPython %edit command: Temporary text document it opens is read only

I just installed IPython, and am beginning with Python. I'm trying to use the %edit command. It opens my text editor (TextPad, Windows 7), but the document is read only. I can't type anything. I ...
0
votes
1answer
30 views

How does Git Bash differ from the Windows Command Prompt?

How does Git Bash differ from the Windows Command Prompt? For example: What is the purpose of Git Bash and what is it used for? And what is the purpose of the Windows Command Prompt? I am trying to ...
1
vote
8answers
6k views

How do I rename a bunch of files in the Command Prompt?

I have a problem with filenames. The stupid camera I am using resets the autonumber sequence every so often, and therefore I am getting tons of conflicts if I try and put lots of photos in a single ...
13
votes
2answers
36k views

Windows: List files and their permissions (access) in command line

In linux, ls -l lists files permissions, like this: -rw-r--r-- 1 user user 924 2011-07-01 20:23 test.txt In Windows, commands tree and dir don't have the options to list permissions. How is ...
1
vote
2answers
38 views

WIN7 CMD how to create command to open text files in selected editor

Is there a way to create a command in Windows 7 command line to open some text file in selected text editor? E.g. pspad "text file location" that will open text file in PSPad.
-1
votes
2answers
36 views

how to start a program with command line arguments on windows cmd

i know there are a couple of questions similar to this one out there but and while i have browsed through them, none have been able to resolve my problem. My code takes in three strings as parameters ...
43
votes
5answers
34k views

Recursively count all the files in a directory [duplicate]

Possible Duplicate: How can I count the number of folders in a drive using Linux? I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, ...
55
votes
2answers
11k views

How to append to a file as sudo? [duplicate]

Possible Duplicate: sudo unable to write to /etc/profile I want to do: echo "something" >> /etc/config_file But, since only the root user has write permission to this file, I can't ...
101
votes
18answers
7k views

What's the quickest way to count the number of each character in a file?

I want to count the A's T's C's G's N's and "-" characters in a file, or every letter if needed, is there a quick Unix command to do this?
2
votes
1answer
3k views

How do I delete all files smaller than a certain size in all subfolders?

I have a folder with many sub-folders containing small tif files (less than 160kb) which have been merged together in bigger pdf files, together with some big multi-page tif files. I want to delete ...
7
votes
2answers
2k views

How can I make zsh's vi mode behave more like bash's vi mode?

I am really liking the general speed of zsh, but two things are annoying the heck out of me. I have to hit wait a moment between hitting escape and hitting slash to get to the history search (if it ...
0
votes
1answer
2k views

Use ffmpeg copy codec to combine *.ts files into a single mp4

I've got a bunch of ts segments described by a single index.m3u8 file: index.m3u8 segment1_0_av.ts segment2_0_av.ts segment3_0_av.ts segment4_0_av.ts segment5_0_av.ts I know they ...
0
votes
1answer
7 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
0
votes
0answers
4 views

Deleteing site on IIS using addcmd won't remove bindings

I have an installer that adds SSL website using following command %windir%\system32\inetsrv\appcmd add site /site.name:SSL /physicalPath:C:\inetpub\wwwroot ...
10
votes
10answers
8k views

Google Search from Linux Terminal

I saw a Google console app someone wrote a while back, but it was actually a website emulating a console. What I'm after is a shortcut or linux terminal app which I canuse to quickly search google. ...
0
votes
0answers
14 views

VLC batch conversion from m3u8 won't move to next file without user input

I have a batch file that is supposed to open every m3u8 file in a folder, stream it into a mp4 file and move to the next one. The lengths of the videos vary and the m3u8 files don't appear to have any ...
0
votes
2answers
2k views

Setting environment variables and appending to system-wide %PATH% with a Windows batch file

I'm trying to set three environment variables and append them to the machine path. Right now my code is like this: setx CATALINA_HOME "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7" /m ...
2
votes
1answer
48 views

Hex of filesize

I am following a tutorial on few kernel dev. I encountered an operation where I have to use dd like dd ... if=PBL.bin of=... count=block_number The block_number variable is defined to be as The ...
0
votes
2answers
24 views

copying file from UNC path to startup folder on Windows 7 machines

I have sucessfully figured out how to copy a file to "\machinename\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\startup" however I want to run this as part of an existing startup batchfile. I ...
3
votes
3answers
2k views

Command Line from within Sublime Text

I recently switched from Notepad++ to Sublime Text 2, and it's amazing. There's one thing I'd appreciate and that's compiling my files from the same environment. Sublime text has a console and a ...
0
votes
1answer
111 views

Robocopy: copy files preserving folder structure but adding a subfolder

I need to copy a folder which contains subfolders with files to a shared folder on another machine. During that, the script should create a custom subfolder in each destination folder and place files ...
0
votes
2answers
23 views

How to enable Remote Assistance and add an exception for it in Windows Firewall from the command line?

I need to enable Remote Assistance from the command line. The equivalent of checking this box and hitting Apply. This is for automation and I tried editing the registry entry ...
1
vote
1answer
36 views

windows cmd - return first 3 files of a search

Searching to return the 3 most recently modified files of a particular extension. The search is simple: C:\> dir /od .zip "C:\Users\foobar\Desktop" Other solutions employ creating temporary .txt ...
0
votes
1answer
177 views

Unable to execute command or shell on remote system: Failed to Execute process

On my Ubuntu virtual machine, I run: ssh windowsxp@10.0.0.2 'dir' When I tape the password, I get this error: Unable to execute command or shell on remote system: Failed to Execute process. Why ...
1
vote
0answers
31 views

Why copy-paste in Windows command-line tools is usually cumbersome

I've used the command prompt, cygwin, mobaxterm in Windows. Although they do support copy-paste, the operation is usually not that straightforward. The selection of the text in the command prompt is ...
4
votes
4answers
18k views

How to disable sleep mode via CMD?

With only the command prompt, is it possible to disable sleep mode when closing the lid of a laptop?
0
votes
2answers
19 views

Not process a variable in a string immediately in batch script

I'd like to know if it's possible to process a variable containing a variable not immediately but only when asked. For example this batch: @echo off setlocal EnableDelayedExpansion set VA=Two set ...
6
votes
3answers
10k views

Enable/disable Windows 7 device via command line

I have a device that I often enable and disable using the Device Manager. I'd like to write a script to do this programmatically (that is, using the command line). I saw a program called devcon that ...
3
votes
3answers
2k views

Is there an RSM replacement in Windows 7? (to eject USB and Firewire devices from command line)

I know Windows XP and previous had an rsm.exe file in the <root>\windows\system32 folder that could be used to manage media. I used this command in batch files and from the command line to eject ...
1
vote
2answers
2k views

Find external and internal devices attached to a system in Linux

How can I find through terminal which devices are external and which are internal? By external I mean devices that are attached to a USB port. For Example, USB Drive, Portable USB hard drive etc. By ...
0
votes
0answers
8 views

Libre office impress is slow to convert pptx to pdf

I'm running Libre Office on my server to convert the powerpoint to a pdf file. Using a .ppt file: libreoffice --headless --convert-to pdf filename.ppt is running fine and take like 3 or 4 ...
39
votes
6answers
44k views

How to list folders using bash commands?

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
1
vote
2answers
34 views

Search-and-go in Windows CMD

I know that for file search on Windows CMD one can use the following command: dir /S /P "PATH/FILENAME" Is there an easy way to go straight to the result directory. For example, the requested file ...
3
votes
2answers
352 views

How to open a file from bash command line in the already open Emacs instead of a new instance?

How to open a file from bash command line in the already open Emacs instead of a new instance? When I type $ emacs file.txt it opens a new Emacs instance, instead of opening the file in the ...
7
votes
4answers
4k views

Why won't my Windows 8 Command line update its path

I needed to add a new entry to my PATH variable. This is a common activity for me in my job, but I've recently started using Windows 8. I assumed the process would be similar to Windows 7, Vista, ...
1
vote
2answers
77 views

Remove attributes to sub folders and files

i hide my folders and files through hidden attributes of command prompt,i am struggling to unhidden all sub folders and files, how i hide the files in command prompt attrib +s +h "foldername" ...
0
votes
0answers
9 views

Installing mysql - Fedora20 - Where is the installation directory

I am trying to install mysql on to a Fedora 20 box. I am using the below guide which states the following; First, MySQL was replaced by MariaDB since Fedora 19 ...
7
votes
4answers
6k views

How to emit sound using built-in speaker from a command line?

How to emit sound using built-in speaker from a command line in Windows and Linux?
1
vote
2answers
3k views

How to optionally copy and rename a file in Windows?

Basically, in an automated batch file, I want to copy and rename a file if the destination file is missing or older. There are several variants, which do not quite work: copy /Y c:\source\a.file ...