0
votes
2answers
52 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.
0
votes
0answers
12 views

MySQL/MariaDB CLI limits max password? [migrated]

I've got strange problem - my MariaDB instance CLI (Linux) does enforce limit on how long password can be. For example, setting password like this UPDATE mysql.user SET ...
1
vote
1answer
57 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
87 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
16 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
39 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
13 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
123 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
39 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
84 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
152 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
58 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 ...
0
votes
2answers
122 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
52 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
28 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
45 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
195 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
27 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
268 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
53 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
146 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
54 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
78 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
2k 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
392 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
79 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 ...
0
votes
1answer
179 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
310 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
66 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
123 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
76 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
30 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
381 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
122 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
79 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
317 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
263 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
238 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
1k 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 ...
2
votes
3answers
2k 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? ...
90
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 ...
-3
votes
3answers
3k views

How to safely kick out other users logged in as root?

I tried this: pkill -KILL -u root It turns out that wasn't what I wanted. Now I can't log in by SSH. What is the correct way? Edit - I've added the word "safely" to the question. I know that you ...
1
vote
2answers
215 views

Set up linux with both GUI and CLI

I want to know if it's possible to install ubuntu server (if there is an other Linux distribution that solves this I'm open to suggestion) with both GUI and CLI so that i can choose to boot it with ...
2
votes
1answer
107 views

How can I calculate the total size of an extremely large number of files with a particular extension?

I've got a directory in Linux that contains a large number of files (tens of thousands), plus directories that may contain thousands of files as well. At some point the following du command fails ...
1
vote
4answers
2k views

How to configure PHP CLI on linux ubuntu to run as www-data?

I have a symfony2 application on my ubuntu. Symfony has a plenty of useful console commands (like php app/console cache:clear or php app/console assets:install web). The problem is If I run them as ...
0
votes
2answers
124 views

broke pipe when creating file system

I want to ask help on how to solve my problem broken pipe when creating the file system through ssh. Here is the result when I issue the create filesystem command in ssh. [root@6~]# mkfs -t ext3 ...
1
vote
2answers
541 views

How to delete files quicker than rm -rf? [duplicate]

Possible Duplicate: Millions of files in php’s tmp error - how to delete? Is there any way how to delete folder/files quicker than with command rm -rf? It seems my disc is filled with ...
-1
votes
1answer
228 views

Edit a file on CentOS 6.3 Minimal [closed]

I installed CentOS 6.3 Minimal on VMWare Player, and I realized how 'minimal' the setup is... Don't have network connectivity. From what I searched on google, I need to edit the file ...
0
votes
2answers
113 views

MySQL: Load data infile and ignore tab in file

MySQL command I have so far: load data infile 'data.txt' into table foo (column_foobar); data.txt: bar1 bar2 bar3 Note the tab at beginning of each line. How can I ignore the tab ...