0
votes
1answer
28 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
54 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
52 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
54 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
20 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.
0
votes
1answer
149 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
55 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
50 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
87 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
143 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
72 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
2answers
207 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
2answers
251 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? ...
83
votes
5answers
3k views

How to “cd” into a directory with this name “-2”?

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 ...
-4
votes
3answers
353 views

How to 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?
1
vote
2answers
180 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
69 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 ...
0
votes
4answers
355 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
77 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
3answers
300 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
202 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
74 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 ...
0
votes
0answers
41 views

solaris + manipulate lltconfig command

I work on Solaris machine ( Solaris 10 ) , machines - de1a and du1b regarding lltconfig command is it possible to view from the lltconfig command only one device (NIC as e1000g0 ) and not all list ...
1
vote
1answer
75 views

running commands as other users - best method

When running commands as other users from the command line, what is recommended best practice? In the past I've used sudo like so: sudo -u username command [args] I've been told (with no ...
3
votes
2answers
88 views

Rename a directory containing many files

I made a mistake in a rsync and all the files are copied long with its full path. All the files that I copied are at /var/www/photos/2012/1007/1007 Attempt 1 Now I would like to fix the paths, by ...
0
votes
1answer
113 views

xdg-mime returns “xprop: unable to open display '' ”

I'm attempting to track down a problem with a particular CSS file being returned as text/html instead of text/css. file -mime install.css returns some less useful info: install.css: text/x-c; ...
0
votes
1answer
53 views

Keyboard mapping stuffed in terminal

I'm logging into a remote linux box: Linux lbox 2.6.32-5-amd64 #1 SMP Wed May 18 23:13:22 UTC 2011 x86_64 GNU/Linux and my keyboard mapping seems to have gone down the drain. up: ^[[A down: ^[[B ...
0
votes
3answers
192 views

Files copying between servers by creation time

My bash scripting knowledge is very weak that's why I'm asking help here. What is the most effective bash script according to performance to find and copy files from one LINUX server to another using ...
1
vote
2answers
132 views

Linux command line based spam checker?

Does a command line based spam checker exist? We have created a mailbox at a 3rd party, and unfortunately decided on spam checking 'disabled' in the initial setup. There is no way to re-enable spam ...
0
votes
2answers
176 views

how to check how many minutes have passed since the user is idle? [closed]

I want to write a script that will show how many minutes the user is idle. Since the last touch of the keyboard and mouse. Example: #!/bin/bash while true do command_lines... ... sleep 60 echo ...
1
vote
2answers
82 views

using find and grep to empty multiple files

find . -name '.htaccess' -print | xargs grep -il 'sound' | xargs -p sh -c ">{}" Trying to find some .htaccess files on a host that've been compromised, grep them to make sure they are bad ...
27
votes
6answers
1k views

Smoothest workflow to handle SSH host verification errors?

This is a simple issue that we all face and probably resolve manually without giving much thought. As servers change, are re-provisioned, or IP addresses reallocated, we receive the SSH host ...
1
vote
3answers
68 views

Deploying applications with dependencies

This is extremely basic (It's probable really obvious too), but it's so basic there is nothing on it. Do I treat a remote linux server like a treat my computer when testing? For instance, on my ...
0
votes
4answers
272 views

403 Forbidden Access

Yesterday my supervisor mounted one of his directories onto my server. The problem is, I can't access them and I have no way of contacting him right now. When I type in the URL I get this error: ...
1
vote
1answer
330 views

Where does apt-get or aptitude update download package lists to?

I am having trouble with aptitude update and apt-get update not downloading a certain list file (specifically http://gb.archive.ubuntu.com precise/universe Sources [5,019 kB]). I can download it ...
0
votes
1answer
81 views

Escaping characters when calling ssh from windows

I need to call an ssh command from a Windows command prompt that will execute a command on a remote Linux machine. The command accepts two string parameters, one of which can potentially be ...
1
vote
4answers
312 views

Linux command to retrieve a byte range from a file

I know that head and tail can take -c option to specify a byte offset. I'm looking for a way to efficiently extract a byte range from a large log file.
-1
votes
1answer
63 views

How to reconnect to a wireless connection [closed]

I'm trying to figure out the best way to have the wifi adapter reconnect to a wireless network after it's been disconnected. When the wifi connection is lost (due to the AP rebooting, or a weak ...
1
vote
1answer
261 views

How do I redirect piped output to display rather than file?

On the linux CLI: I have a 3 day running scan that I piped to a file (I know, should've rather had it write internally to a file). Which brings me to my question, say I have a command ...
0
votes
2answers
690 views

How to install GNOME desktop from DVD on CentOS 6 using the command line?

I have installed CentOS 6 in Virtualbox. Although I have chosen to install General Purpose GNOME Desktop, the GNOME desktop does not start. All I get is a black and white text prompt. I would like to ...
0
votes
1answer
151 views

Whats the output format of “df -ki” in AIX?

I just wanna know the output format (the order of columns) when running the command df -ki in an AIX system. I dont have access to an AIX system , and since it doesnt run on x86 machines , i cant try ...
3
votes
1answer
3k views

Command: move all files inside a directory to another directory (including hidden files)?

I tried to move all files inside a directory to another directory like this: $ mv /directory_one/* /directory However, the hidden files (such as .htaccess) in /directory_one won't be moved. What ...
0
votes
5answers
102 views

Determining the version of a packaged process on linux

It's easy to know which version of a package is installed on a linux distro: package-manager info <packagename> i.e.: yum info ntp However, is there a 'linux convention' sort of way to ...
1
vote
2answers
112 views

Linux command to remove directories with white spaces

I usually use the command line bellow to remove directories on file system. But, for the 1st time find is returning names with white spaces on it, and rm doesn't recognize it. find . -name ...
2
votes
1answer
974 views

tar Exiting with failure…?

i'm untaring with this command tar -pxvzf filename.tar.gz an everything seems to be going fine but, it unexpectedly exits with the error below. Is there a reason why I'm receive this error and / or ...
1
vote
5answers
197 views

Is there an option to open file with line number from command line in 'vi'?

I've seen so many examples/usages about how to display/hide line numbers in vi edit mode. To turn on line numbers: Type :set number in edit mode To turn off line numbers: Type :set nonumber in edit ...
0
votes
2answers
1k views

How to stop Solr service from command line

I used to start Solr with this command: java -jar start.jar and all I had to do to stop it was press Control + C But then I started it this way: java -jar start.jar & Which starts it as a ...
2
votes
4answers
174 views

What happens when I kill a command with ctrl+c?

Specifically, I ran a rm -R /my/dir by mistake on a unix box (ubuntu 10.04). When I realized the horror within a few seconds I quickly killed it with the Ctrl+C command. It now seems I haven't lost ...
0
votes
1answer
146 views

ec2 LAMP REDhat distro change mysql password error

i am on ec2 plain linux and wish to change my mySQL password ive tried: sudo mysqladmin -u root -p '***old***' password '***new****' then it prompts me to enter password then i enter ***old*** ...
1
vote
1answer
103 views

Recursively change the name of a file and the content inside the file if matches a keyword

I can use sed to do recursively find and replace a string in a bunch of files. Like so: find -name "*.py" -not \( -name .svn -prune \) -type f -print0 | xargs -0 sed -i 's/cat/dog/g' However is ...

1 2 3 4 5 7