Questions tagged [command-line-interface]

A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.

A command-line interface (CLI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.

1564 questions
17
votes
2 answers

poll/monitor a linux command's output

Is there a way to monitor the output of a linux command without having to type it over and over. I want to do something like: tail -f file.txt But for a command like: ps aux | grep httpd | wc Thanks!
bandhunt
  • 273
  • 2
  • 5
16
votes
3 answers

Why is there a difference with Unix date between 2 and 3 months

How is this possible and how do I deal with it? I'm making backup script that is dependent on Unix date and have discovered an interesting bug: [root@web000c zfs_test]# date +%y-%m-%d --date='2 months ago' 14-04-01 [root@web000c zfs_test]# date…
Shirker
  • 579
  • 1
  • 5
  • 18
16
votes
4 answers

How to split a file and compress directly?

I've a 100GB file and I want to split into 100 of 1GB file each (by line break) e.g. split --bytes=1024M /path/to/input /path/to/output For the 100 files generated, I want to apply gzip/zip to each of these files. Is it possible to use a single…
Ryan
  • 5,831
  • 24
  • 72
  • 91
16
votes
3 answers

Tracking progress with xargs

I'm using xargs to execute a command on a set of input parameters something like this: cat | xargs -n 1 -P 5 The input file is really long and take a long time to run. So I'm just waiting for the command prompt to show up. Is…
Utkarsh Sinha
  • 261
  • 2
  • 5
16
votes
3 answers

Windows Server 2012 GUI went missing after removing Active Directory

I'm sorry but i'm stuck in figuring out a problem i'm facing here. I removed the AD feature from server manager and after rebooting, my server 2012 gui wasn't there anymore. There's only command prompt to deal with. I tried to enable back gui based…
mfmz
  • 169
  • 1
  • 1
  • 6
16
votes
3 answers

Strange bash history behaviour when running multiple sessions

How is command line history stored when I use multiple terminal windows? I know it is stored in .bash_history but I can't see the logic on what history is used if I open new window. It almost feels nondeterministic in a sense that I never know what…
Alex Gitelman
  • 275
  • 2
  • 7
16
votes
5 answers

Can I change a user password in Linux from the command line with no interactivity?

I have a specific use case where I would really like to be able to change a user's password with a single command with no interactivity. This is being done in a safe fashion (over SSH, and on a system with only one user able to be logged in), so…
Paul Hoffman
  • 2,214
  • 5
  • 19
  • 23
16
votes
7 answers

Can I run a GUI program in the background on the windows command-line?

For example, in Bash, I can do this: emacs foo.txt & Is there any equivalent in Windows? I can't seem to figure out a way to do this with the windows version of emacs.
Jason Baker
  • 1,229
  • 6
  • 20
  • 26
16
votes
2 answers

What does the "@" sign mean in ls -l output?

I have this output on MacOSX: $ ls -l total 40 -rwxr-xr-x@ 1 levente staff 52 30 Sep 15:38 pl -rwxr-xr-x 1 levente staff 675 14 Feb 17:07 plplay -rwxr-xr-x@ 1 levente staff 662 26 Jan 14:13 plstart -rwxr-xr-x@ 1 levente staff 296 1 Dec…
Leventix
  • 263
  • 2
  • 6
16
votes
4 answers

How to disable passive mode in linux ftp command

I am using the "ftp" command of linux to send data to a 3rd party provider. This company states that we need to "Disable passive mode in your FTP client", and I confirm it doesn't work in passive mode. However, when I googled the linux command, I…
nute
  • 791
  • 2
  • 11
  • 22
15
votes
5 answers

How to clear Windows event logs using command line?

Normally I can open the Computer Management console, go to the Event Viewer snap-in, open the Windows Logs folder, right-click on Application/Security/Setup/System subfolder, choose Clear Log and confirm by pressing the Clear or Save and Clear…
Ivan
  • 3,398
  • 19
  • 50
  • 71
15
votes
5 answers

How can I tell if Windows is running in Safe Mode?

I have a Windows server that will sometimes reboot into safe mode after updates. I'm working on that issue but what I'd really like to know is how can I check to see if Windows is running in safe mode or not. Ideally I would like to incorporate it…
cwd
  • 2,763
  • 9
  • 33
  • 48
15
votes
1 answer

pgrep/pidof usage for complex process names?

I am trying to use pidof or pgrep to be able to send a HUP to a process in my system. The problem is that I only want to kill the process with a precise parameter. This is the output of 'ps awx' 657 ? S 0:00 processname software 658…
aseques
  • 718
  • 4
  • 12
  • 28
15
votes
4 answers

How to read the "IDLE" column in the output of the Linux 'w' command?

I'm trying to figure out a process that monitors users sessions on a remote server and alerts them when they are being idle too long, which with the Linux command w is aptly appropriate. Problem is - w uses 3 different formats to specify the idle…
Guss
  • 2,670
  • 5
  • 34
  • 59
15
votes
3 answers

Reading mail from /var/spool/mail/root

I've tried using mail for reading the e-mail messages in /var/spool/mail/root, but it's really a pain. I've read that pine is better, but it seems not to be available for my linux (CentOS 5.4 x86_64). At least nothing appears when I type yum list…
GetFree
  • 1,500
  • 7
  • 23
  • 37