-2
votes
0answers
20 views

sip from command line

I am definitely remember, that somewhere on freeswitch.org site there was an example of how to initiate a SIP call from command line. It was not by using sipcmd, but either some general linux commands ...
0
votes
0answers
17 views

Odd behaviour with varnishlog and stream redirecting

I wrote a helper to debug varnish installation and have used it on both production and development server. The odd thing is, I encountered different behaviour even though the setup is nearly identical ...
0
votes
3answers
65 views

Tail a file from ssh and mirror to a local file

To tail a file over ssh, I can use ssh -t remotebox "tail -f /var/log/remote.log" However, it is possible to sync the tail with a local file? So a file automatically mirror the update of the tail ...
1
vote
1answer
50 views

Fork a process inside a bash shell script

I've a simple shell script like #!/bin/bash sh -c "sleep 60" & exec sleep 120 In using the pstree command, I found something like `-sleep(11681)---sleep(11682) The first sleep is due to the ...
2
votes
2answers
179 views

Batch rename directories with regex via command line on Linux

I have a folder on the server that contains directories that are created daily and are named by date, like so: 07-06-14 08-06-14 09-06-14 etc. At some point I decided that a preferred naming would ...
1
vote
5answers
126 views

How to split the output into different files?

I have a input file like foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz bar xxx yyy zzz bar xxx yyy zzz foo xxx yyy zzz .. How to split the input file by line, into foo.txt ...
0
votes
1answer
95 views

Turn Linux into Router (Cisco-like) [closed]

how you doing? I have two Sophos UTM 220 Appliance for study. They have 8 Gigabit Ethernet ports and the hardware is like a common PC (Intel Motherboard, Processor and DDR2 Memory). I would like to ...
1
vote
2answers
62 views

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 ...
21
votes
8answers
3k views

How to hide a password passed as command line argument?

I'm running a software daemon that requires for certain actions to enter a passphrase to unlock some features which looks for example like that: $ darkcoind masternode start <mypassphrase> ...
0
votes
2answers
68 views

How do I see if user connected to mysql over ssh tunnel?

I imagined command last, would also give me mysql over ssh tunnels list. But I was wrong. Is there a place where this tunnels are logged? Ubuntu server 12.04.
1
vote
1answer
66 views

How to read CPU usage statistics shown in “top” screen?

I'm pretty confused about understanding of CPU usage in a linux server... Please see the screenshot below: WHAT does Cpu(s): 9.1%us mean ACTUALLY? and WHAT does 74.7 at the ruby/deployer row ...
1
vote
1answer
410 views

opening sar activity files error “Invalid system activity file”

Note: I opened this question on Stackoverflow first and realized that this is the right place for the question. Just stating that it is not a duplicate, already closed the question on SO. I am new ...
0
votes
1answer
17 views

disabling extra message after changing to new directory

Whenever directory is changed, it is displaying the new directory name: # cd /home/ Directory: /home/ # cd ~ Directory: /root How to disable it? We are logging into csh. We already verified ...
-2
votes
3answers
44 views

Put another hdd in ubuntu server 10 [closed]

I am using Ubuntu server 10 for LAMP and hosting sites. I installed the server without a GUI, and what I want to do is to add a second HDD for some backup. I attached the HDD but the problem is I ...
0
votes
0answers
15 views

CLI modify-user with add-mysql returning “A db login with same name already exists”

I am trying to give an existing user access to a newly created database via virtualmin via CLI. This what I am using: virtualmin modify-user --domain mydomain.com --user existingusername --add-mysql ...
-6
votes
1answer
175 views

How to undo rm -rf? [closed]

How we can undo rm -rf command ? For example, I have Application folder. And I have remove it by rm -rf Application But it was my mistake and want to recovery or want that Application Folder. But ...
0
votes
1answer
42 views

How to restrict a Linux program's permissions

I'm running a native linux program from PHP using shell_exec. Specifically, calling antiword to extract text from Microsoft Word files users uploaded. However, as I've got no way of assessing ...
1
vote
2answers
108 views

How to directly query authoritative DNS nameserver from command line, bypassing cached servers? [closed]

How can I directly query authoritative DNS nameserver from Linux and Mac OS X command line, bypassing cached servers? This is helpful when wanting to immediately verify newly-created DNS host names ...
0
votes
1answer
278 views

Linux empty buffer cache command permission denied

I'm using the following commands to flush cache: # sync; echo 3 > /proc/sys/vm/drop_caches # sync; echo 2 > /proc/sys/vm/drop_caches # sync; echo 1 > /proc/sys/vm/drop_caches When I use ...
-2
votes
1answer
70 views

How to show the actual username instead of nobody in Linux?

I'm trying to find the memory usage for each account on my VPS. I use the "top" command to achieve that but the problem is that it is not showing the actual username for each account. I have four ...
1
vote
2answers
186 views

Gnu parallel & pipe

I want to send each line of a file to another program's stdin, e.g. input.txt line1 line2 line3 I want to use the gnu parallel like this (i.e. pipe each line as stdin to the more command) cat ...
1
vote
2answers
74 views

Redirect to stdin instead of argument when using xargs [closed]

for exmaple, using the command cat foo.txt | xargs -I{} -n 1 -P 1 sh -c "echo {} | echo" The foo.txt contains two lines foo bar The above command print nothing.
0
votes
0answers
51 views

fork/vfork are failing but return an out of bounds errno

I have a piece of software running on a 64 bit Cent 5.8 Final box, kernel 2.6.18. This piece of software using fork and vfork. Recently some failures occurred, and in my logging I can see that fork ...
0
votes
1answer
61 views

Netcat: connection lost before transfer is complete

Interesting thing with Netcat (nc) in CentOS 5 or 6 (nc-1.84-10.fc6 or nc-1.84-22.el6.x86_64). How can I work it around? I can't find a bug about this, but It models a file transfer to a remote ...
0
votes
1answer
303 views

Cron won't use msmtp to send emails in case of failed cronjob

I'm trying to configure a machine so that it will send me an email if one of the cronjobs output something in case of an error. I'm using Debian Wheezy. Cron is working normally (without the email ...
0
votes
1answer
30 views

list all files with the same name in order of when they were modified

I have a directory, let's call it htdocs/live/. Many different directories are underneath this directory, each with a file commonFunctions.js living in the js directory. For example, here is the ...
5
votes
1answer
300 views

why top gives cpu percents more than 100%

see below statistics by "top -u steve", something is wrong with top? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3490 steve 20 0 10444 312 248 R 114 0.0 23:33.22 ...
-1
votes
2answers
58 views

Better way to exec at a specific folder

It is possible to exec at the specific folder, rather than I need to use two commands separately? e.g. cd /opt/folderA exec .... cd /opt/folderB exec ....
2
votes
3answers
179 views

how to convert a running process into a nohup and keep a logfile

I have a process currently occupying a terminal ]$ command some_argument I want to exit from the terminal and go home, but in the mean time I don't want to kill this running process. For the ...
0
votes
1answer
66 views

find all end subdirectories in a tree

given the following structure: oz123@debian:~/ $ tree . . ├── a │   ├── a1 │   ├── a2 │   └── a3 ├── a1 │   ├── a11 │   ├── a12 │   └── a31 ├── b │   └── b1 │   ├── b11 │   │   └── b21 │   ...
2
votes
2answers
157 views

CVS command to list all available modules to checkout?

I'm running CVS in a bash shell. I'm just trying to see which modules are available for checkout. I've been researching for a while and the only thing I've come up with is: cvs checkout -c which ...
2
votes
2answers
54 views

Listing or Working With a Range in the Shell

Is there any way I can target a range of a-c* in one go? For example, instead of doing this individually; /home/a* /home/b* /home/c* I've tried testing with ls, but not sure if it's working right. ...
-2
votes
1answer
3k views

Cannot find a valid baseurl for any repo in centos 6.4

when I want to install any repo I found this error Error: Cannot find a valid baseurl for repo: rpmfusion-free I'm using centos 6.4 I tried to check other packages I found the same error ... so ...
0
votes
1answer
562 views

run winexe on linux in order to exe CLI commands on WIN server ( workgroup server )

winexe is tool that can execute commands on WIN machines from Linux servers winexe syntax should be as the following: winexe -U [Domain/]User%Password //host command Because I have windows 7 ...
0
votes
2answers
81 views

Timezone inaccuracy

we've been having an issue getting time synced across our Litespeed web cluster, that being that the system time (we're using CentOS) appears to be thinking that the current time for EST (Being the ...
1
vote
1answer
303 views

Automatically close netcat connection

I am executing the following command from a script: echo '{"hostUp": true}' | sudo /usr/local/bin/netcat localhost 8001 However, the netcat client stays open indefinitely. How can I close the ...
1
vote
1answer
384 views

How Can I specify server to use for mail command

I am working on a crontab job that runs a script, which looks in a specific directory for the existence of a file. If the file does not exist it exits. However, if the file exists it sends an E-mail ...
-3
votes
1answer
70 views

How can I open a GUI from a cli in linux? [closed]

I connect via ssh to a server (Linux) and can not open a GUI. The error is DISPLAY is not set I assume this is some environmental variable. How do I configure this so that a GUI is displayed when ...
1
vote
1answer
145 views

Upgrade Ubuntu Kernel from command line

I am running Ubuntu 10.04 on my server. It has Ubuntu kernel 2.6.X running on it. I was trying to update my kernel yesterday. For that I had run the following commands sudo do-release-upgrade -c ...
-1
votes
1answer
79 views

CentOS 6, FTP settings lost after single user mode

I recently put my server into single user mode with init 1. After I did that, I ran telinit 3, to try and get out of single user mode. It seemed to do the trick, however, now I cannot get back in with ...
1
vote
1answer
34 views

How do I find out the current remaining lifetime of my AFS tokens?

I can use klog to renew my AFS token, but I am wondering whether there is an equivalent command to view the remaining lifetime of my AFS token.
1
vote
1answer
624 views

ntpdate and firewall: no server suitable for synchronization found

I'm behind a firewall and only have access to ports 80 and port 443. How can I sync my system's clock? Here's the command I issue: sudo ntpdate -u 1.debian.pool.ntp.org But I keep getting the ...
-3
votes
2answers
154 views

How can I count the number of lines matching a pattern returned from a linux command

How can I count the number of lines matching a pattern returned from a linux command I want the number of lines returned beginning with 'foo' , so if I pipe the output to grep will this ...
-1
votes
2answers
94 views

Consecutive Remote Rsync Commands (Purpose Defeated by Multiple Password Prompts)

I have two huge folders that I want to rsync one after the other using one command. Command 1: rsync --compress /home/user/folder/ user@192.168.1.10:/home/user/a/folder Command 2: rsync ...
0
votes
2answers
416 views

special characters in http_proxy environment variable

What is the correct format using special characters in http_proxy environment variable? Or to be mor specific, what to do with special characters in username or password when authenticate to http ...
3
votes
2answers
284 views

How can I find my public ip address with built in system commands without relying on any third party websites or services? [closed]

Are there any built in system commands such as ping that let me discover my public ip-address either on a Windows or Linux operating system? This should not rely on any third party websites or ...
0
votes
1answer
301 views

s3cmd put only files that do not exist in destination bucket

I've been using s3cmd to sync local files on our server with the S3 bucket. There are over 200,000 files on the local server. Can't seem to find any documentation on the site that explains how to ...
-3
votes
3answers
2k views

How to find files of certain extension and tar each of them in to another location

I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain ...
3
votes
3answers
4k views

changing colors of files/dirs in linux ls

I use putty with a black background and was wondering if there was or is a way to change the colors of the dirs which are dark blue. i noticed DIR_COLORS.xterm and DIR_COLORS do they play this role? ...
91
votes
5answers
4k views

How to cd into a directory with this name “-2” (starting with the hyphen)?

I have a directory named: -2 I want to cd into it but the cd complains: bash: cd: -2: invalid option With no success, I've tried: cd "-2" cd '-2' cd \-2 Any solution? Edit: no file browsers ...