13 Answered Questions for the topic command line

Command Line Linux Scripting Bash


How to count lines in a document?

I have lines like these, and I want to know how many lines I actually have... 09:16:39 AM all 2.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 94.00 09:16:40 AM all 5.00 0.00 0.00 4.00 0.00 0.00 0.00... more


Is there any 'sudo' command for Windows?

I always work on a non-administrator account on my Windows computer. Sometimes I need to install programs which requires administrator access. As I mostly use the Windows command prompt, is there a... more


How can I display the contents of an environment variable from the command prompt in Windows 7?

In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the `JAVA_HOME` or `PATH` variables)?I have tried with `echo $PATH`,... more
Command Line Unix Sed Text Processing


How can I extract a predetermined range of lines from a text file on Unix?

I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know... more
Command Line Unix Shell


How can I reverse the order of lines in a file?

I'd like to reverse the order of lines in a text file (or stdin), preserving the contents of each line. So, i.e., starting with: foo bar baz I'd like to end up with baz bar foo Is there... more
Command Line Linux


Linux command to print directory structure in the form of a tree?

Is there any linux command that I can call from a Bash script that will print the directory structure in the form of a tree, e.g., folder1 a.txt b.txt folder2 folder3
Command Line Linux Unix Manpage


What does the number in parentheses shown after Unix command names in manpages mean?

For example: man(1), find(3), updatedb(2)? What do the numbers in parentheses (Brit. "brackets") mean?
Command Line Linux Bash Echo


How to change the output color of echo in Linux?

I am trying to print a text in the terminal using echo command. I want to print the text in a red color. How can I do that?
Command Line Linux Overwrite Cp


How to force cp to overwrite without confirmation?

I'm trying to use the `cp` command and force an overwrite. I have tried `cp -rf /foo/* /bar`, but I am still prompted to confirm each overwrite.
Command Line Linux Terminal


How to get the current date and time in the terminal and set a custom command in terminal for it?

I have to check the time in linux terminal.<br/> What is the command for getting date and time in Linux terminal ?<br/> Is there any way in which we can set custom function ?
Command Line Sas Dm Display Manager


SAS Display Manager commands?

The SAS display manager is a comamnd line interface to the SAS system, which remains in Base SAS as a legacy facility. However the online documentation on how to use this facility is sparse at... more
Command Line Linux Unix Sysadmin


How to find out what group a given user has?

In Unix/Linux, how do you find out what group a given user is in via command line?
Command Line Linux Unix Grep


grep, but only certain file extensions?

I am working on writing some scripts to `grep` certain directories, but these directories contain all sorts of file types. I want to `grep` just `.h` and `.cpp` for now, but maybe a few others in... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.