How to find the number of uppercase words in a text, using ubuntu grep?
location: linuxexchange.com - date: June 10, 2014
I want to find the number of uppercase words in a text file by using ubuntu terminal 'grep' command..
I already tried with grep -c [[:upper:]] a.txt command. But it count words which have simple characters also.
My text: I am Tom PERERA
My command line output should 2, that the words are "I" and "PERERA".
Error connecting to SQL Server from Ubuntu+PYODBC
location: linuxexchange.com - date: July 23, 2015
I found many similar question but none of the solutions worked for me. It seems to be a pretty simple matter but still I can't find a solution.
I'm using a headless ubuntu server to connect to a SQL Server on a windows Server 2008 using a python script that does it using pyodbc. The script runs perfectly on my local windows machines, but when I try it on ubuntu server I get the error:
Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')
The connection string I'm using is:
Any thoughts ? thanks in advance
EDIT : Adding the main files
Driver = FreeTDS
Server = 10.23.11.10
Port = 1433
TDS_Version = 7.2
Description = v0.91 with protocol v7.2
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodb
Entity Framework databasefirst with SQL Server
location: linuxexchange.com - date: May 31, 2012
I'll try to explain my problem although to be honest I can't even understand it. After many changes in a couple of tables in my DB now I try to create a Foreign key and I'm getting this error when updating the EDMX.
gHOP.msl(410,10) : error 3007: Problem in Mapping Fragments starting at lines 410,
1511: Non-Primary-Key column(s) [UserGUID] are being mapped in both fragments to different conceptual side properties - data
inconsistency is possible because the corresponding conceptual side
properties can be independently modified.
gHOP.msl(1511,6) : error 3012: Problem in Mapping Fragments starting at lines 410, 1511: Data loss is possible in Itinerary.UserGUID.
An Entity with Key (PK) will not round-trip when:
(PK does NOT play Role 'Itinerary' in AssociationSet 'FK_Itinerary_Users' AND PK is in 'Itinerary' EntitySet)
gHOP.msl(410,10) : error 3012: Problem in Mapping Fragments starting at lines 410, 1511: Data loss is possible in Itinerary.UserGUID.
An Entity wi
How to use phpmyadmin mysql database using terminal in ubuntu 10.4?
location: linuxexchange.com - date: March 28, 2013
Can any one help me to use phpmyadmin mysql database through terminal.
I am using ubuntu 10.4.
I guess the command like this /opt/var/usr/ mysql. I'm not sure about it.
Howto use Windows Authentication with SQL Server 2008 Express on a workgroup network?
location: linuxexchange.com - date: December 19, 2014
I have two computers running SQL Server 2008 Express: c01 and c02, I setup both for remote connection using windows authentication. Worked fine for c02 but not for c01.
This is the error message I'm getting:
Cannot connect to ACAMP001\SQLEXPRESS.
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)
For help, click: http://go.microsoft.com/fwlink?>ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476
I don't know if I'm missing something, here is what I did:
Enabled TCP/IP protocol for client from Sql Server Configuration Manager.
Modified Windows firewall exceptions for respective ports.
Started the Sql Browser service as a local service
Added Windows user to this group: "SQLServerMSSQLUser$c01$SQLEXPRESS"
From Management Studio, I added "SQLServerMSSQLUser$c01$SQLEXPRESS" to SQLEXPRESS instance's logins under security
Is there an NTP server I should be using when using Amazon's EC2 service to combat clock drift?
- date: April 7, 2015
I’m using AWS and am on an EC2 server …
~]$ uname -a
Linux mydomain.org 3.14.33-26.47.amzn1.x86_64 #1 SMP Wed Feb 11 22:39:25 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
My clock is off by a minute ro so despite the fact that I already have NTPD installed and running
~]$ sudo service ntpd status
ntpd (pid 22963) is running...
It would appear ntp packets are blocked or there is some other problem because I get this error …
~]$ sudo ntpdate pool.ntp.org
2 Apr 16:43:50 ntpdate: no server suitable for synchronization found
Does anyone know with AWS if there’s another server I should be contacting for NTP info or if there are other additional configurations I need?
Thanks, - Dave
Edit: Including the output from the comment ...
~]$ sudo ntpq -p
remote refid st t when poll reach delay offset jitter
Unable to connect to Google Compute Engine using “in browser” SSH
location: linuxexchange.com - date: January 21, 2015
After changing two passwords, root and the default user, suddenly we notice now that the "in browser" link on Google Compute Engine fails to connect via SSH.
Strangely, however, if we use the SSH command from the command line that Google provides (i.e. $ gcloud compute ssh VM-NAME --zone VM-ZONE) - SSH works.
It appears SSH is working - but the "in browser" SSH link no longer connects. What might have gone wrong and how do we fix this?
Of note, a commenter below suggests it is not related to passwords but purely SSH keys - so it looks the answer to this question might rest around if there is a way to regenerate SSH keys on GCE instances. We are searching. If anyone knows code to regenerate SSH keys for GCE please post.
Rails server not running when using Rails gem version 3.2.9
location: linuxexchange.com - date: December 23, 2012
I have created a new Rails project. And used the gem file used in the famous Michael Hartl tutorial
gem 'rails', '3.2.9'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
gem 'jquery-rails', '2.0.2'
group :test do
gem 'capybara', '1.1.2'
group :production do
gem 'pg', '0.12.2'
When running rails server am received this error message:
could not find gem rails in the gems available on the machine
run bundle install..
I know am running on rails 3.2.9 I have checked with the command rails -v
what is going wrong? Am using Windows 7 - 64 bits. am a ruby on rails newbie.
When I change to gem rails 3.2.8 no more errors appear and rails server run successfully.
Further errors I remember getting through my trials
Able to connect to ssh server on any port using an ssh tunnel
location: linuxexchange.com - date: September 10, 2013
I'm having a little problem with the ssh server running on an ubuntu server. I'm using key-pair authentication, and i'm able to connect just fine, but the problem is that i can connect on any port (using a tunnel), even though "Port 22" is defined in sshd_config. Why am i able to connect on any port? How can i stop ssh from listening to ports other than port 22?
Unable to find large files in Linux using “du h”
location: linuxexchange.com - date: July 25, 2013
I have a hadoop cluster running out of space recently. I try to clean some logs to get some disk space. I run the command df -h, it shows:
/dev/sda1 22G 20G 1.9G 92% /
/dev/sda3 1.8T 747G 960G 44% /data/1
/dev/sdb1 1.8T 755G 986G 44% /data/2
/dev/sdc1 1.8T 754G 987G 44% /data/3
/dev/sdd1 1.8T 745G 996G 43% /data/4
The HDFS is under the dir /data which is fine. But the root dir / has little space left. So I used the tool ncdu which can calculate rapidly the disk usage of dir, it shows:
2.9TiB [##########] /data
1.5GiB [ ] /home
800.9MiB [ ] /usr
716.3MiB [ ] /var
349.1MiB [ ] /lib
293.8MiB [ ] /opt
There is no large directory. I also tried the command such as du -a | sort -n -r | head, still unable to find this invisible dir or file. Does anyone know some other way to find out where the problem is?
Page: 1 2 3 4 5 6 7 8 9 10