-
understandin man pages.
<<im using knoppix 5.01 installed on the HDD and im in the GUI>>
ok so i have been trying to understand the man pages for copmmands but they use terms in there that i dont understand. its like it was writin for advance users only. for example i do the man page for su and i look at the option -c. this is what it says...."specify a command that will be invoked by the shell by its...." and thats it. what does that mean. i thought the command was su so what is the -c doing to su. also every time i run this command su -c kwrite it says can not connect to x server. what the heck is x server. and the option - what does it mean by sets up the enviroment to what the user would expect if they had logged in directly. i dont uinderstand what they mean by log in directly. direct;ly to what. im sorry if these are all stupid questions, its just i wish the man pages where easier to understand. they have so many terms i dont even understand or ever heard of.
-
Senior Member
registered user
su -c "command" let you run that command ONCE ONLY as root! a neat way to get one step safer, no unneeded root access...
same reason I always do minimal installs, security, the more programs availabe and the more often rootprivileges are used the more securityholes/mistakes... are possible and things get harder to keep track of.
if I was to install say a ftpserver, the total size would likely land around 200meg, yes I know I could likely trim it some (ok lot), but I like to have some things "extra" like mc, ssh and links.
-
so the su -c you have to put a command after the -c. so it runs what ever command you specify such as this.
su -c cd /home/LT72884/LFS/sources. that should take me to my sorces folder right.
-
uhm, spose
but he said it would do it once
then it's going to drop out of su mode
instead of
su
command this
command that
accidentally fdisk the entire drive cos you forgot you're in su mode you could do the
su -c tricky command
and then you'd be back as your own plain user again
and, if you run the dos prompt window from the desktop, then you would be able to access the X server
if you try it from the alt-F1(-6) screen, it wouldn't as the Xserver runs on window 7
i think
-
Senior Member
registered user
actualy you HAVE to have the "" in the comand. otherwise linux waits for more input...
so
wold work but most likely will not. just a small thing but...
say you type
that would start konqueror as root, and you could do lots of things there. or you could do where pid you can get with comand ps (or better ps ax).
look for the line with name of whatever you want to kill (crashed program or process you dont want running...)
pid is first number in the line, ps aux will give username aswell.
you can even do
Code:
ps ax|grep konqueror
and get only lines with konqueror in them.
grep is a nice program to use when wading trouhg lots of lines of output looking for something specific
just pipe (the | caracter) output from the previous progrm trough it and is looks for the patern you have givien, in this case "konueror".. you can pipe output from many programs to another, like ls to less or more, and ls to grep for that matter...
keep asking, we will try to answer
-
whoa holly crap thats confusing. so whats the point of the "" what does that mean to the system.
-
Senior Member
registered user
in most cases "" means to take what is between " and " as ONE input, say to copy a filename with spaces and such.
in some cases you use \ to tell program that you want the space(or whatever) to be treated as a part of the name.
say you type
Code:
touch /home/knoppix/test\ file.txt
that creates a emty file named "test file.txt" in /home/knoppix/
now type
Code:
cp /home/knoppix/test file.txt /home/knoppix/test file 2.txt
this wont work (atleast shoud not), this as cp takes it to mena that it should find a file called test and copy it and name the copy file, but you have no file named test so...
Code:
cp /home/knoppix/test\ file.txt /home/knoppix/test\ file\ 2.txt
will work, this as you told cp that it should treat space as a caracter in the name with the \ infront of the space.
and if you have understood you know that
Code:
cp "/home/knoppix/test file.txt" "/home/knoppix/test file 3.txt"
should also work and give you a new copy of the test.txt file.
and you are rigt manpages can be hard to understand, they are made more to aid the ones with knowlege to cope with slightly differing versions and syntax between environments, but you are getting closer each answer you get i hope.
one nasty ting some jokers do (if you leave you compter unatended and still logged in) is make a file that fills our /home/username and name it , if you try to delete that without thinking you delete your entire home, can you figure out how to delete it?
-
ok so what does the file do to your /home/username folder. and you want me to try and create the file and delete it.
so what is -Rf, is that the code the jokers use.
-
Senior Member
registered user
NO do not create a file named "-RF *", just be aware of it.
The file is NAMED "-Rf *" which is BAD if you just try to delete it, as "-Rf *" means Recursive+forced (that is everything in this directory and all under it) in most *ix variants, so when you use rm (delete in Linux) it wili interpret -Rf as delete everything.
just think on it and type what you think is answer here.
Some info on everything up to (but NOT including) the phrase "one nasty ting".
my file is named and and has this info if i type ls -al and paste nfo for test file.txt
Code:
-rw------- 1 knoppix users 0 2006-11-13 20:16 test file.txt
that is 0 in size (the 0 just infront of 2006), it has no text in it yet, it is just a name.
-
hmm interesting, my koppix wont let me creat a file named -Rf, says names of files cant have a dash in front of them. maybe its to prevent that very thing. i think to delete it you would need to put the actual file name in quates so it sees that thats the file it needs to manipulate.
Similar Threads
-
By gonzalezmfrank in forum General Support
Replies: 5
Last Post: 06-13-2005, 05:16 PM
-
By Borg in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 02-09-2005, 02:24 PM
-
By reyn in forum General Support
Replies: 4
Last Post: 08-24-2004, 02:56 AM
-
By sn0wflake in forum General Support
Replies: 4
Last Post: 03-25-2004, 07:08 AM
-
By felipe_lopes in forum General Support
Replies: 16
Last Post: 11-10-2003, 06:00 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

5 Port Gigabit Unmanaged Ethernet Switch, Home Network Hub, Office Ethernet S...
$9.64

NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch
$49.99

Cisco Catalyst 2960-48TT-L 48-Port Fast Ethernet Managed Rackmount Switch
$46.99

5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play
$31.99

TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch
$19.99

10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W
$39.99

TP-Link TL-SG105, 5 Port Gigabit Unmanaged Ethernet Switch, Network Hub, Ethern
$15.25

Arista DCS-7010T-48-R 48P 1GbE 4P 10GbE SFP+ RA Switch with rack mounts
$69.00

D-Link DGS-1210-28P 28-Port PoE Gigabit Web Smart Switch With Cord
$49.99

Linksys LGS328MPC 24-Port Managed Gigabit PoE+ Switch with 4 10G SFP+ Uplinks
$224.95