Questions tagged [command]

186 questions
2
votes
1 answer

Bash: two commands in dollar-parenthesis don't have same behavior

I don't undertsand why, in Bash: echo $(hostname --fqdn) works, echo $(id -un) doesn't (id: –un: No such user). Backticks give the same results. Is there some good practice for using this notation? Does the id command have something special…
Doc Davluz
  • 145
  • 1
  • 5
2
votes
1 answer

Can sftp check for existing data?

I have 700 binary files (pdf) to download and right now only 400 are available on a sftp server. Can sftp, from the cli, determine what files exist in the local directory so it doesn't need to re-download those files, or will all 700 need to be…
2
votes
4 answers

How can I copy sanely (not using "Mark") from the Windows command prompt

Given a very long single command at the command line in Windows, I'd like to simply copy that command into clipboard. I am just looking for the ubiquitous Shift-End , Ctrl-C type functionality almost all editors have. I DON'T want to use Mark (yes,…
2
votes
2 answers

How to show high usage user's username with the top command, if the username is too long?

I'm having problem identifying high usage users on a shared Linux machine. I use the "top" command and it does show which commands are using the most CPU. But the usernames on this server all start with the same prefix. So the USER column cuts-off …
Qi Fan
  • 350
  • 3
  • 12
2
votes
1 answer

timeout duration on linux

I'm trying to run a command for 5 hours and 10 minuts. I found out how to run it for 5 hours but I'm unable to run it for 5 hours and 10 minuts.. timeout -sKILL 5h mplayer -dumpstream http://82.201.100.23:80/slamfm -dumpfile slamfm.mp3 runs fine.…
David
  • 23
  • 4
2
votes
1 answer

rebuild raid array mdadm command

I have created a raid array say RAID5 or RAID10 with four drives. I wish to force resync of the same array, Please let me know the mdadm command for the same. Also, in case of RAID1 (mirroring) what is being done as part of resync. Is it basically…
kumar
  • 433
  • 3
  • 10
  • 23
2
votes
2 answers

What does this command do on Linux? It is eating my CPU.

I have a VPS and I am hosting a game site on it. Recently my CPU went to 3000% and memory is going near full. When I checked the processes I found this process eating the CPU: Pid-1571 (Trace) (Kill) Owner-mysql Priority-0 CPU %-52.7 Memory…
alhoseany
  • 123
  • 3
2
votes
1 answer

How to install Windows service from command line while setting recovery options

I have a Windows service that I build on a build server and then install on multiple remote servers using Sysinternals PSExec and sc create. This was worked well to this point but I now have a need to set the recovery options for the service so the…
user36540
  • 175
  • 1
  • 4
2
votes
2 answers

how to browse a folder named '-' in linux machine

I have created a directory named - [root@server50 public_html]# mkdir - [root@server50 public_html]# ls -al drwxr-xr-x 2 root root 4096 2011-03-16 02:22 - How can I enter the directory using 'cd' command.
2
votes
5 answers

Is there a way I can queue long running tasks?

Is there a way I can do the following in a unix terminal: Start a long running process Add another long running process to start when the previous is done Repeat step 2 until I have queued the processes I need to have run Reason I ask is that I…
Svish
  • 6,977
  • 15
  • 38
  • 45
2
votes
1 answer

ping: Warning: time of day goes back (-203647us), taking countermeasures

I'm getting the below weird warning message sometimes when pinging to 8.8.8.8 (Occurrence is very low). Any idea about the root cause? $ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=111 time=256…
Harikrishnan
  • 1,159
  • 2
  • 14
  • 32
1
vote
1 answer

how to stop for loop on another tty

We are connecting to the same host via the same user. So, only our sessions/tty are different. If one of us starts a for loop such as:for i in *; do command $i; done, I don't know how to stop it. All I can do is search for the command name in ps aux…
Sam Gold
  • 11
  • 2
1
vote
0 answers

Can't use assigned variables after command

I have the following script filename="network_list.txt" while read -r line do name="$line" ping_stat=$(ping -c 4 $name 2>&1) if [ $? -ne 0 ] then echo "server $name is down" else echo…
KTM
  • 213
  • 2
  • 6
1
vote
2 answers

Using rsync and which directories should I place in my exclude file when using rsync?

I would like to use a CentOS VM for a mirrored full backup of my CentOS mail server. Both are the same version and are up-to-date. I have found that without excluding certain directories the VM backup has kernel panic attacks and fails to load. I…
ricbax
  • 169
  • 1
  • 12
1
vote
2 answers

How to cp files from sources to destination without using alias or non-alias and without getting confirmation/prompts?

$ cp /source/* /destination/ cp: overwrite `/destination/file1.conf` Aim is to copy files from source to destination without getting prompt or using non-alias(/) method.
Vinay Kumar D
  • 11
  • 1
  • 4