General :: Vim: Command To Show All Non-printable Chars?
Dec 5, 2010
Suppose I'm editing a file with vim. The file, a text file, contains line terninators which are line feeds (LF= 0x0a). It could also contain horizontal tabs (HT= 0x09) and some more non-printable chars (in fact, it could be corrupt and contain anything). Will vim let me see the location within the text of those chars (chars = characters) and what each of them is? I know there are such things as hexdump and the like but it would be nice for me to stay within the vim session.
I'm in normal mode then I press "ayiw to yank a word into register a, gvim shows the "ayi as I type it near the bottom right corner. Is it possible to get this real-time display in console vim, if so how?
Which command will tell me whether a directory is a symbolic link or not? if it is a symbolic link, is there another command to show me which directories it is linked to?
I shutdown around 4 - 5 hours ago which would be around 14:00 to 15:00 time range. But as you can see there's no entry for it. Why? and how can i find when i last shutdown?
Code: last lyle pts/1 :0.0 Tue Jul 6 19:18 still logged in lyle :0 Tue Jul 6 19:15 still logged in lyle tty7 :0 Tue Jul 6 19:15 still logged in
Can anyone point me to already built and mostly working utilities that will catalog the contents of (external) USB and flash media in a way that they might be searched?With cheap (under $100 US) terabyte external drives, it is too easy to get another drive and fill it. I'm looking for utilities or applications that will help me know what I have, cull the duplicates, and avoid the need to spin a drive just to see if it holds what I seek.
Years ago there were utilities that would read the contents of diskette media and create a printable "index" or "catalog" page. The pages were conveniently sized to match the diskette so that one could store the page in the diskette sleeve for future reference.Later, the pages got replaced with applications that stored a disketter ID along with each file name. One could then search for a name, or pattern, and discover which diskette held the file(s) of interest. Today we don't have diskette sleeves, but we do have cases for our external USB drives and wallets for our flash media. A printed index would be nice to have.
I have webpage its charset is 8859-9 and it was prepared in windows with char encoding ascii. From ftp access, I am opening it via gedit in ubuntu then turkish chars changes like (turkish ı became ý). What can I do to avoid this kind of stupid things?
Years ago on AIX I used to create a file of key strokes, including function keys (mainly F3 and F12) into a file, and used that file as input to an INFORMIX program, to automated tasks, something like this: fglgo myprogram.fgo <keystrokefile.txt
Now, I'm using Aubit language on GNU/Linux, and I'd like to do the same kind of thing, but I can't recall how I worked out the chars for the function keys, I'm using a different emulation (xterm), and I can't work out what characters to put in the key stroke file. My $TERM variable contains "xterm". If I type "infocmp", I get this:
Code: # Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm xterm|xterm terminal emulator (X Window System), am, bce, km, mc5i, mir, msgr, npc, xenl, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
[Code]....
1. Is the above infocmp output the place I should get the information I need?
2. What chars do I need to put into my file to simulate me pressing F3 and F12?
3. Is there a way for me to put such chars in a file by just pressing those function keys (I tried a here document, but that doesn't work (it's as if the function keys are not even pressed)).
I have an application where the client is written in Visual Studio (C#), run on PCs, and the server end has traditionally been SCO. We're now migrating to Linux. I can, for example, input "Test This" in a text box on the client, and when the server end is SCO, it is able to 'accept' the character sent to it from the client. When I try this same example on Linux, that character (hex D1) does not 'make it' from the client to the server.
The problem is not on the client, and I have verified that the telnet connection is in fact passing these extended characters, but they are not recognized properly by the Linux server.In researching this, I've played with setting the LANG environmental variable from LANG=en_US.UTF-8 to several of the other possible values found in /usr/lib/locale, for a european locale (the end user is actually in Spain), and these 'euro' characters are still not handled properly in my application.Would anyone be able to point me to any specific env variable settings, and/or anything else that would resolve this issue?
Is it possible to show the output of a command in xfce4-panel? Like you would do with Conky.The Xfce battery monitor consistently uses a bit of my CPU so I wish to run "acpi" (and work out a clever way to just show the percentage) every 5 or 10 minutes in the panel.
I have many folders with many subfolders. All I want it to get the folder name and the first subfolder. I tried using ls -R but this give me more than I want it. Let say I have:
I wrote a bash-script that splits each of many .sql-files into two parts by some condition using head utlity. After that I execute all the scripts in sqlplus, and in one or two of them I get an error: SP2-0042: unknown command ")" - rest of line ignored. If I open the file with vi, I can see that in the end of each line there's a "^M", which is treated as a single character. If I delete this character placed before the closing parenthesis, the scripts executes without any errors. In the initial script opened by vi there's no such characters. Is it a problem with the head utility or with something else? Of course, I cannot grep these special chars.
This has to also show the line count. I can get it to show the files but not the line count. What is the single command used to identify only the matching count of all lines within files under the /etc directory that contain the word „HOST? List only the files with matches and suppress any error messages.
I'm working with an embedded Linux (Montavista 5.0). I want to allow users of my program to choose filenames with Unicode chars like the German All Unicode chars are visible inside the program (dialogs, buttons,...) and I can write Unicode chars into files and read them. But it is not possible for me to create a file with an Unicode filename! I can't write such Unicode chars in the shell! I set my locals to "de_DE.utf8". locale charmap says UTF-8! But when I try
Every Unicode char is writte to the shell in this way with a leading The same happens when I write such chars from my program to the shell with printf!
I have several files with many lines something like this:
I'm trying to write a script that will count the number of characters per line that doesn't contain a ">" symbol and give me an average of those values. I have most of the script together but I can't figure out how to connect some of the steps.
I configured it to use IMAP to access our exchange 2010 server front end on a LAN connection. Our webmail connection is segregated behind Forefront, so it was not connecting/authing that way. Even though smartphones have no problem. (sidenote, is there an activesync linux mail client ?)
I have many root folders and several folders underneath my inbox. total mailsize in inbox is 3.5 GB without subfolders. The sent is likewise as large. And is likewise empty.
Things I checked already: View is all Folder subscription is on and local copy is on
More info: Thunderbird worky fine. But thunderbird is missing calender Tried adding lightening, but it won't add into thunderbird. Will try finding a diff add on, or if anyone knows how to get lightening into thunderbird 3.1.8 on ubuntu 10 that would be great as well.
I've searched the forums and the google looking for a means to do this and haven't found anything I can use. I have a large file that looks like this:
Code:
18000034161828M850 18000034172676M850 98 093095
[code]...
I need to add spaces at the end of each line to ensure that every line has 80 chars before the carriage return. I was thinking something like this, but it doesn't do the right thing:
Code:
cat filename | sed -e 's/$/(bunch of spaces)/' | cut -c1-80 > filename2
I'm on fedora, so I can use awk, sed, bash, ksh, etc.
The command time shows the time taken by a command to complete. Is there a command that shows the change in disk usage caused by a command? I would like to know how large a package is when I install it from source.
What is the command to show the host name of the ip address?Suppose, I've an ip address like 209.191.122.70, now I want to know its host name.What is the command for that?
I use Slackware 13.1 32 bits in my eeepc and I have only Xfce installed on in it (didn't install KDE). So I use Xfce on it. On my other machines when I'm using irssi on konsole I don't have any problems with latin chars (accentuated) but when I'm using Terminal on Xfce i have it. In irssi or in terminal? How can I put it right? I use Portuguese layout keyboard. I already see that is in irssi at terminal on Xfce. But I have "/set term_charset UTF-8".