Questions tagged [command]

186 questions
13
votes
4 answers

Handy parsing for numbers with unit suffixes?

Let's say you have data with quantities in human-readable format, such as the output of du -h, and want to further operate on those numbers. Let's say you want to pipe your data through grep to do a summation of a sub-set of that data. You do this…
beans
  • 1,580
  • 13
  • 16
12
votes
1 answer

Meaning of killall -0

I see from many place the follow command is used to check if a process exists, e.g. killall -0 nginx But from the documentation I can't see anything related to this argument, can anyone explain?
Howard
  • 2,135
  • 13
  • 48
  • 72
11
votes
1 answer

Why does rsync forks itself? And why one such forked process is almost kinda idle (as seen in iotop)?

This is referring to the matter stated here and I am also experiencing the same. In one of my servers, I ran an rsync, to backup a huge directory (size greater than 300 Gb) to a different disk, mounted on same machine. The directory being rsynced…
Gautam Somani
  • 296
  • 3
  • 14
10
votes
6 answers

fdisk - partition in single line

Can you create a partition in a usb disk using fdisk command in a single line. fdisk command is interactive in nature, But I want to automate partition creation in a single line using fdisk command.
kumar
  • 433
  • 3
  • 10
  • 23
10
votes
1 answer

How to print list of users and groups on FreeBSD?

How to print list of users and groups on FreeBSD?
Eonil
  • 10,459
  • 16
  • 36
  • 54
9
votes
10 answers

Useful Commandline Commands on Unix

As there is a windows version of this question, I decided to open a community wiki for the same question under unix, linux, and the like. I'll be updating this list with the answers: bash: exec 3<> /dev/tcp/localhost/80 # Redirect to port 80 of…
Álvaro
  • 173
  • 4
  • 10
8
votes
1 answer

Windows PowerShell - How to view commands history date/time

I want to list entered commands in Windows PowerShell with their respective timestamps. How can I do it with Get-History command?
7
votes
1 answer

What is difference between */5 and 5 for minute value in crontabs?

I have cron with following definition. */5 * * * * /somescript What is the difference between them? Is second one running every 5 minutes and first is running 5 minutes after every hour?
pregmatch
  • 303
  • 1
  • 5
  • 14
7
votes
4 answers

How to check that all ZFS snapshots within a pool are without holds before destroying that pool

Question Already I can check each snapshot of a filesystem individually, manually. I would prefer to check all at once (all with a single command or script). Please: can that be done with a script? The answer should be good for file systems with…
Graham Perrin
  • 635
  • 2
  • 10
  • 24
7
votes
8 answers

remote command execution on Windows 2003 server

I have a single command that I would like to execute on a remote Windows 2003 server. I have tried wmic, which works, but the only way to display standard output is to redirect it to a local file, then list the local file (kind of clunky). I have…
Steve Hawkins
  • 223
  • 1
  • 2
  • 6
7
votes
2 answers

What is the function in Windows similar to Inode in Linux?

Is there any commands which is same as the function inode in Linux. Any info will be helpful.
Riyas
  • 191
  • 1
  • 3
  • 14
6
votes
3 answers

Can I run a shell built-in command with Puppet?

I want ~/.bashrc will be source whenever changing its content. I created a bashrc class with something like this: file { "/root/.bashrc": ensure => present, owner => root, group => root, mode => 0644, source =>…
quanta
  • 51,413
  • 19
  • 159
  • 217
6
votes
3 answers

Can I place my script in /usr/bin?

I wrote a small bash script for starting, stopping and restarting my java applications and I want to make it available to all users so they could run it. Should I just place it in /usr/bin to do that? Is it the right place for my scripts? Isn't that…
Rihards
  • 769
  • 2
  • 12
  • 22
6
votes
3 answers

Run shell script on a command

I want to run a shell script when date -s command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script logger -p user.notice "date -s command executed" -f…
LinuxPenseur
  • 443
  • 1
  • 6
  • 16
5
votes
1 answer

where is systemctl command in redhat 6.6 64 bit OS?

I was trying to run status of network by following commands. sudo systemctl status network However the system says systemctl command not found.
DaeYoung
  • 185
  • 1
  • 1
  • 6
1
2
3
12 13