General :: "file" Command Not Working Properly For UTF8 Files?
Oct 30, 2009
I have some files which are UTF8 and have first line as blank. It shows as data file by "file" command. If I remove the blank line, it shows it as UTF8 text file. I have to choose displayable text files from many files, so I used "file" command.
Note: I do not have permission to attach file. So not able to attach sample file here.
I know this is maybe a basic question while can UTF8 charset include all the language around the world?if it can ,then what is the difference between en_US.UTF8 and zh_CN.UTF8? what is the difference between en_US.UTF8 and zh_CN.UTF8 in the centos locale setting?
My Question is I have installed the ssh key authentication in Server A. User can connect this using key file via SSH. without authentication user can't connect this system via SSH. Now I am trying to copy the file from Server B through SCP command. But it is not working. While I am trying use this command from Server B I am getting below error "ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out lost connection". xxx.xxx.xxx.xxx is Server A. SSH is enabled in both server A,B.
I have installed Ubuntu 10.10 to a live USB stick and created a new user with an encrypted home directory.Everything is working fine apart from a weird problem.when I create a new file or directory in the encrypted home it does not show up in directory listing.eg:cd ~/Documentstouch test.txtls -aldrwxr-xr-x 2 USER USER 4096 2011-03-02 14:12 .drwx------ 32 USER USER 8192 2011-03-02 13:03 ..if I try editing the file by entering the path, it works, even though ls does not list it!eg: nano ./testls as root makes no difference and the file is not hidden.If I create a file in nautilus, it shows there but still does not show in the terminal or any other app
basically in the child process iam just calling the ptrace(PTRACE_TRACEME, 0, NULL, NULL) system call but if add this stsyem call rest of the code not working properly. i found the reason basically what happening is when we have ptrace() system call its printing the same variable 3 times i.e its not executing it 3 times but just it is printing 3 times .iam just wondering how it could be possible.
I'm running uShare on my Linux 10.4.2 box to stream videos from my computer to my Xbox via Wifi. As the Xbox360 can only handle AVI files I'm trying to write a script that traverses through all my media at;
/media/Media/
Looking for AVI's and then linking to them symbolically into a directory called;
/media/Media/Xbox360/
I plan to set the script up as a cron job so it will constantly keep up to date. This is the script so far;
Code:
#!/bin/sh #Searches through media drive to find .avi files and symbolicly links them to Xbox360 ushare folder cd /media/Media/ files=$(find . -type f -iname *.avi -exec echo '{}' +)
[code]....
and the only file being created is .DS_Store, I think. One other caveat I've not yet been able to get my head round, is that from time to time I'll convert videos from say MKV using mencoder to AVI's and plonk them in the /media/Media/Xbox360 folder, and so when the script traverses all my media folders I need to get it to not link to files that are already in that /media/Media/Xbox360 folder.
I am trying to read binary file in c but my code is not working properly. I am not getting the same output as that in file. you can view my code below.
convert latin1 to utf8 I have a problem at convert latin1 to utf8. There are so many unreadable characters at latin1 db, and these characters could not convert into utf8 also. So I could not import to new utf8 db. Is it possible to convert these character to utf8 to import to utf8 db?
I have a form that have a browse button, convert to ASCII button, cancel button and text area... all i have to do is...? when i click the browse button and choose a folder that have a utf8.txt the file that have utf8 will appear or display into the text area... what i can i do to make this..?
Write a script that will take a list of filenames as arguments and output a count of how many of them are regular files, and how many of them are scripts (if the file is executable, it will be assumed to be a script file)
I am using inotify-tools in order to achive my task. inotify-tools has two commands inotifywait or inotifywatch. I am using inotifywait. I want to be able to extract unique paths that inotifywait will output and then take those unique file path run them through clamscan and quarantine the files if necessary. Here's what I have come up with so far.
I am currently trying to make a front-end (client) for xmms2. However, I have run into a road block. I need to get the current number of seconds of the current playing song, so one would think to use:
Code: xmms2 current "${playtime}" However, all this does is return a blank line. Infact, if I try to do any "formatting" for
i am using ubuntu 8.04 and i am facing a problem of mounting external pen drive, exernal harddisk or even other /dev/ partitions in my login mount is not working so i manually mount the partition by mount command .. but i dont know how i can resolve this problem ...
fdisk -l currently returns as Disk /dev/sda: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders
I installed Kubuntu 9.10 this morning and haven't been able to get my wireless working properly. I can connect to my network (WEP 128bit key) and acquire an IP address without any problems. But as soon as it connects it stops talking to the router (about 4 pings after it connects). The pings then change from a reply to saying "Destination host unreachable", even though it works fine on the Windows box I'm sending this from.
When i use the shutdown-command in the terminal as root, it nearly works. It starts to shut down, and it looks like all programs and the kernels shuts down. I end up with a black screen, sometimes with the ubuntu-logo on, but it never powers off. I have to force it off by holding the power button. When i use the graphical interface to shut it down, it works perfectly. The poweroff-command works without problem too.
Let's say there's an url. This location has directory listing enabled, therefore I can do this: wget -r -np [URL] To download all its contents with all the files and subfolders and their files. Now, what should I do if I want to repeat this process again, a month later, and I don't want to download everything again, only add new/changed files?
1). vlc player not working properly..when i play the video in vlc audio is not clear its strucks every few min.. but video is moving nice....how to solve this problem i'm newbie to linux open suse
2)when i play Mp3 songs in banshee its good but some times its hang...
3)how to restore the linux?(i mean how to restore the operating system)
i'm just trying to understand named pipes in linux.For that i'm just trying to create one named pipe using mkfifo.but its not working properly..following is my code snippet. so if anyone comes across the mistake i made
My sound on Runescape stops and picks up, is very choppy and annoying. I'm using Debian "Lenny". Sound on everything else works just fine (Flash, VLC, etc...)
I have a decrypted DMG file and want to mount it on /mnt/ramdisk. I ran file on it and it shows as it should:
Code: # file ramdisk.dmg ramdisk.dmg: Macintosh HFS Extended version 4 data last mounted by: '10.0', created: Tue Nov 16 23:25:47 2010, last modified: Wed Nov 17 01:29:16 2010, last checked: Tue Nov 16 23:25:47 2010, block size: 4096, number of blocks: 4272, free blocks: 429
I have a linux (Ubuntu server 8) that is busy collecting data files for me, but I need to see them on a windows machine. The winXP computer is in an AD domain. The ubuntu server is running Samba and I believe I have set up sharing - I can see/list the files on winXP. however, when I try to open the files to read ( in this case by Wireshark ) I get a permissions denial. Where and how can I set those permissions?
I had a problem with apache2 and getting .htaccess working. I have done some things and i believe its working the ErrorDocument command is anyway. I believe there may be some problems with the rewrites though.Im trying to take a urlhttp://localhost/showthread/123and make it display whats on http://localhost/index.php?showthread=123The rewrite rule is Quote:
Options +FollowSymLinks RewriteEngine on RewriteRule ^showthread/([^/.]+)/?$ index.php?showthread=$1 [L]
I have a log file on ubuntu 10.04 that has 500 lines of log data in it. What command could I use in a terminal to split the single 500-line file into generate ten files each with 50-lines of log files each?
Is there a way to copy a file from the desktop to /usr/lib/ICAclient folder that I have, by using drag and drop.For some reason, I thought I was able to do this in Mint.
I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?