logs archiveIRC Archive / Freenode / #centos / 2015 / July / 15 / 1
OneM_Industries
Hey, how would I rename a file through the command line?
yuppie
mv or cp
mv file newfile
cp file newfile
OneM_Industries ;)
OneM_Industries
Ok, so if I wanted to make a new copy of a file and paste it to the active directory, how would I do that?
yuppie
cp file newfile
and its not active directory
its "current working directory"
pwd
print working dir
kaos01
cp file .
yuppie
if you cp file . ... wont they have the same name?
kaos01
yes
test it dude
some things you shoudl just test and see how it works
wolfy
OneM_Industries: please join ##linux. we do not provide basic linux tutorials here
OneM_Industries
Sorry.
         

yuppie
kaos01 cp: ./oneliners.txt and oneliners.txt are identical (not copied).
maum
hello
tgm4883
I've got two CentOS 6 VMs. One is a desktop (KDE), the other just a command line install. I've got a file with Japanese text that I'm trying to see on both systems. I'm ssh'd into both VMs, and if I cat the file on both systems I only see the Japanese characters on the desktop install. The other I see random characters (
"ã¢ã’ªã¹ã¿ã’©ã¤ã’"ãµã¤" )
Thoughts on what I might need to be able to cat/vim that file?
ultimately, I'm trying to use python to send that file as the message portion of an email to test our email server for an issue, but I think I'll need to be able to read it first
Thermi
Character encoding of the terminal.
Also capability of the utility you use.
tgm4883
wouldn't that be LANG?
Thermi
Negative. That's the locale.
tgm4883
both are set to en_US.UTF-8
oh
(Action) looks
Thermi
Well, en_US is the locale. The rest is the encoding of the locale file, AFAIK.
Is the japanese file encoded in UTF-8?
tgm4883
Hmm, not sure
Thermi
Check. Use file.
tgm4883
Appears to be Japanese.txt: UTF-8 Unicode text, with CRLF line terminators
Thermi
Perfect. Can you try to produce UTF-8 characters using your keyboard on the terminal only box?
Check if they're displayed correctly.
tgm4883
err, how would I do that?
I generally work in english only characters :/
Thermi
https://superuser.com/questions/59418/how-to-type-special-characters-in-linux
http://www.linuxfromscratch.org/lfs/view/6.3/chapter07/console.html
tgm4883
I can't do that in either, but that could be because how I have to access both boxes
which is from a windows machine through putty :(
Thermi
Urgh. It can be your putty then, too.
tgm4883
it's a VM, I wonder if I could do it from vcenter...
Thanks for looking Thermi, I'm going to see if I can find a way to enter the UTF-8 characters into the terminal. I'll ask again in here after I can get that sorted
Thermi
yw
tgm4883: Btw, python doesn't care about the terminal. It reads the file directly.
tgm4883: Python will read it just fine. It has built in UTF-8 support. If in doubt, compare hashes.
tgm4883
Thermi: you know, I swear I tested that before and it wasn't working but I just tested it again and it sent the Japanese text just fine through the email
dtrott
Whats the easiest way in centos to read the motherboard temp from the command line ?
         

Thermi
dtrott: lm_sensors. lOok in the repos.
command is then sensors and sensors-detect
gavit
can one install an rpm without it checking for the deps?
dtrott
Thermi: Thanks that seems to have worked.
gavit
I have a vps and I'm trying to install omd which seems to depend on httpd and some php modules which I seem to already have installed (by the vps)
ght
Question: I have a CentOS 7 EC2 AMI that's been running fine, but suddenly all my ssh sessions became unresponsive...
and I ended up having to reboot it via the web UI, and the metrics indicate the CPU spiked and flatlined at 100%.
What logs can I review to help determine the cause of that?
I've looked at dmesg and dmesg.old and don't see anything, what are the generic logs to check in this type of situaiton?
Nothing around that timestamp in var/log/messages
zlinux
hi all
for just a desktop (actually a workstation, ECC memory used) and will upgrade (re-install) CentOS 6 (currently using CentOS 5)
which filesystem to install? XFS or ext4 ?
I mainly use my desktop for web browsing and web development.
and my hard drive is just 500 GB, don't need more space.
Sokel
zlinux: CentOS 6 does not have XFS.
pj
Sokel: what are you on about, of course CentOS 6 has XFS
it's not the default in CentOS 6 but it certainly has it
zlinux
Sokel: oops, i thought XFS is default on Centos 6
Sokel: so ext4 is the default on it?
kaos01
i deleted a lvm, now box fails to beet im do i manually have to remove the lvm from GRUB_CMDLINE_LINUX --> rd.lvm.lv=xxx
tparcina
How to grep for this line? "FaxGetty[32054]: RECV FAX (000222564): from" but so that 32054 and 000222564 can be 1 or more numbers.
jasem_
hi
tparcina
This ]: is making me problems. :(
Zerberus
tparcina: man grep
tparcina
Zerberus: I couldn't find solution there.
I can't escape : with \: :(
TommyC
What do other lines look like?
Baggypants12000
you'll never escape it with a trailing parenthesis
kaos01
\d+ for PCRE
or [0-9]+
tparcina
TommyC: It really doesn't meter because I'll use -v option to exclude this line.
Baggypants12000: There should be solution.
jasem_
tparcina: try this grep -oE "[[:digit:]]{1,}"
TommyC
Well, ok, but without knowing how specific you have to be it could be different.
tparcina
kaos01: I don't understand your solution. Can you please explain?
kaos01
[0-9] matches a digit "+" matches one or more
in Perl Comp Regex \d matches a digit
so \d+ -> one or more digits
TommyC
grep -P "\d+"
tparcina
kaos01: My problem is how to search for ]:
kaos01
ha ?
tparcina
TommyC: Other lines are not similar.
kaos01
grep -P 'FaxGetty\[\d+\]:'
alexises
kaos01: I say grep -E "^FaxGetty\[[0-9]+\]: RECV FAX ([0-9]+): from"
jasem_
how can i enable and set vino-preferences for all users
alexises
more robust, and I'm not sure of the support for perl regexp
and I proper set that the sting begin with ;)
« prev 1 2 3 4 5 next »