LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-23-2007, 11:06 AM   #1
kim0
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 0
Help on few problems...


1.

Write the command that shows encoding of all files listed in some directory /space.



2.

df output

/dev/hda5 5160576 2440404 2458028 50% /usr
/dev/hdb6 3096336 1147968 1791084 40% /usr/share

copy all files from file system that is on/dev/hda5 partition to /mnt/BACKUP, but without copying files from /dev/hdb6. What is the most optimal command to use for this task?



3.

What command is used for listing file attributes, and can we change the owner on file that has attribute 'i' ?




Thanx for help.
 
Old 12-23-2007, 11:19 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
A few things for you to note, kim0.
  • Please use better subject lines. "Help on few problems..." provides no useful information at all. By posting decent subject lines you will attract more people who are better able to assist. It is in your own interest to do this, and into the bargain you will annoy less people.
  • Is this homework? It sure looks like home work. We are not here to do your homework for you. We will help if you ask properly, but just posting your homework questions is quite offensive, not to mention explicitly against the forums rules.
Now go and read your course notes and do your own homework. When you have an honest question, you are welcome back.
 
Old 12-23-2007, 11:33 AM   #3
lin_myworld
Member
 
Registered: Oct 2007
Location: India
Distribution: Ubuntu 8.04
Posts: 93

Rep: Reputation: 15
1)ls -aFx
* in front of file means it contains executable code,/means directory and . means hidden file.
 
Old 12-23-2007, 11:48 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
lin_myworld, you are not doing a favour to the OP: if this is homework (indeed it looks like copied/pasted questions) first he should try by himself. If someone put the correct solution in a nutshell, he never truly learn and he will never move his brain. Not to mention your replay is a bit off-topic, since he was talking about encoding, not file types!
 
Old 12-23-2007, 11:51 AM   #5
kim0
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
@ matthewg42:

yes its my homework, and i didnt mean to offend anyone, I appologise on that.


@ lin_myworld:

1.

Write the command that shows encoding of all *.txt files listed in some directory /space.


Sorry, I forgot to write that *.txt in some dir /space.


I tried with this:

user@alas:~/public_html$ file space/*.txt

but i get this:

space/baja.txt: empty
space/jaja.txt: empty
space/kimo.txt: empty
space/sisa.txt: empty


and need to get something like

space/baja.txt: ASCII
space/jaja.txt: UTF-8
space/kimo.txt: ASCII
space/sisa.txt: ASCII
 
Old 12-23-2007, 11:54 AM   #6
kim0
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
lin_myworld, you are not doing a favour to the OP: if this is homework (indeed it looks like copied/pasted questions) first he should try by himself. If someone put the correct solution in a nutshell, he never truly learn and he will never move his brain. Not to mention your replay is a bit off-topic, since he was talking about encoding, not file types!

I tried and I did some other problems from homework by myself, but i got stuck with this 3..

I dont need clear solutions, maybe some tips that would help or somthin..
 
Old 12-23-2007, 12:09 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by kim0 View Post
I tried and I did some other problems from homework by myself, but i got stuck with this 3.. I dont need clear solutions, maybe some tips that would help or somthin..
Indeed, this is a better attitude. For question number one you are on the right way, but the output you obtain is quite clear
Code:
space/baja.txt: empty
space/jaja.txt: empty
space/kimo.txt: empty
space/sisa.txt: empty
check the size of the files: they are empty. No character encoding to determine, since they don't contain any character.
 
Old 12-23-2007, 12:16 PM   #8
kim0
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Yeah, they are empty..
So i suppose command file /space/*.txt would write encoding if they were filled with some text?
 
Old 12-23-2007, 12:22 PM   #9
lin_myworld
Member
 
Registered: Oct 2007
Location: India
Distribution: Ubuntu 8.04
Posts: 93

Rep: Reputation: 15
sorry 4 that i see the post after posting mine..
 
Old 12-23-2007, 12:23 PM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
If you can create a simple text file (you should already know the command "cat" or any text editor available on your system) you can test it. Also have a look at the manual page of "file": option -i can be useful in some cases.
 
Old 12-23-2007, 12:37 PM   #11
kim0
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
ok, thanx, got this first one.

And also got the third one done..

Some help with second?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 11 on a laptop (problems and problems and problems) kizersouzay Slackware 20 02-08-2007 10:52 AM
Marvell Yukon Network driver problems, Lilo Windows boot Problems mellowdog Slackware - Installation 7 01-25-2006 02:18 AM
Problems, problems, problems. Lets start with the soundcard Kre8ive Linux - Newbie 5 08-07-2003 01:20 AM
Problems, problems, problems. Lets start with the ES 1868 AudioDrive Kre8ive Linux - Newbie 1 08-06-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration