Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Operating Systems > Linux, Unix

Reply
 
LinkBack Thread Tools
Old 06-03-07   #1 (permalink)
Apple Doesn't Love You
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,985
Blog Entries: 1

Rep: 564 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default UNIX Nub Question

How to I pipe into a command with multiple arguments? I want to pipe the output of find /media/shared/music into chown <username> <output of find>
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 06-03-07   #2 (permalink)
Multi-Quote King
 
The Hundred Gunner's Avatar
 
amd nvidia

Join Date: Jul 2006
Posts: 8,490

Rep: 631 The Hundred Gunner is becoming famousThe Hundred Gunner is becoming famousThe Hundred Gunner is becoming famousThe Hundred Gunner is becoming famousThe Hundred Gunner is becoming famousThe Hundred Gunner is becoming famous
Unique Rep: 360
Folding Team Rank: 1165
Trader Rating: 0
Default

UNIX/Linux irritates me... I'm on Fedora right now lol

If i was to guess, i'd say you have to use quotes to group whatever needs to be grouped? I don't know.
__________________
System: The Shuttle Has Landed
CPU
Athlon 64 3800+ @2.785GHz
Motherboard
Shuttle
Memory
2GB OCZ
Graphics Card
7950GT
Hard Drive
320GB Seagate in Ext. Case
Sound Card
On-board
Power Supply
250W Shuttle "Elanpower"
Case
Shuttle Glamour xPC
CPU cooling
Shuttle "ICE2"
GPU cooling
Stock
OS
Censored to avoid flaming
Monitor
HP M70
The Hundred Gunner is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 06-03-07   #3 (permalink)
Security Sleuth
 
kc-tr's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: root@big-brother:/$
Posts: 1,848

Rep: 119 kc-tr is acknowledged by manykc-tr is acknowledged by many
Unique Rep: 96
Folding Team Rank: 1317
Hardware Reviews: 1
Trader Rating: 8
Default

Yes, there is a way.

chown -R user /media/shared/music

This will change the folder and all of its contents ownership to the user that you specify.

Here is the syntax
chown [ -f ] [ -h ] [ -R ] Owner [ :Group ] { File ... | Directory

-R means reclusive, aka continue to change until nothing left to change lol(within that directory) so if there are additional folders within the /music directory, it will change the ownership of those folders and their contents as well.
__________________
System: █۩█
CPU
E6400 @ 3.4GHz
Motherboard
DFI INFINITY P965-S
Memory
2GB G.Skill HZ
Graphics Card
XFX 7900GS 659MHz/2000MHz
Hard Drive
Raptor 74GB
Sound Card
X-FI
Power Supply
600Watt Modular w/120mm Fan
Case
Cooler Master Centerion
CPU cooling
Stock
GPU cooling
Zalman Fatal1ty FC-ZV9
OS
XP Pro x64
Monitor
Acer AL17

Last edited by kc-tr : 06-03-07 at 08:31 AM.
kc-tr is offline I fold for Overclock.net kc-tr's Gallery   Reply With Quote
Old 06-03-07   #4 (permalink)
Apple Doesn't Love You
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,985
Blog Entries: 1

Rep: 564 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

Nice - I didn't know there was a recursive flag.

Do you know how to do the pipe that way in general?
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 06-03-07   #5 (permalink)
Security Sleuth
 
kc-tr's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: root@big-brother:/$
Posts: 1,848

Rep: 119 kc-tr is acknowledged by manykc-tr is acknowledged by many
Unique Rep: 96
Folding Team Rank: 1317
Hardware Reviews: 1
Trader Rating: 8
Default

I dont know that you can use it with the find command, however I have never tried. Also what exactly do you mean by pipe it out?
__________________
System: █۩█
CPU
E6400 @ 3.4GHz
Motherboard
DFI INFINITY P965-S
Memory
2GB G.Skill HZ
Graphics Card
XFX 7900GS 659MHz/2000MHz
Hard Drive
Raptor 74GB
Sound Card
X-FI
Power Supply
600Watt Modular w/120mm Fan
Case
Cooler Master Centerion
CPU cooling
Stock
GPU cooling
Zalman Fatal1ty FC-ZV9
OS
XP Pro x64
Monitor
Acer AL17
kc-tr is offline I fold for Overclock.net kc-tr's Gallery   Reply With Quote
Old 06-03-07   #6 (permalink)
Apple Doesn't Love You
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,985
Blog Entries: 1

Rep: 564 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

Take the output of 'find /media/shared/music' and have it as the second argument of chown
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 06-03-07   #7 (permalink)
Security Sleuth
 
kc-tr's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: root@big-brother:/$
Posts: 1,848

Rep: 119 kc-tr is acknowledged by manykc-tr is acknowledged by many
Unique Rep: 96
Folding Team Rank: 1317
Hardware Reviews: 1
Trader Rating: 8
Default

so basicly.. Change ownership of all the files/subdirectories of that folder. Then find the contents? if so you could do..(if my syntax is right lol)

chown -R user /media/shared/music | find /media/shared/music -user user

the last "user" listed would be your username after the -R. Try that and see if it works.

Edit: a little more info on the command listed above. the | allows you to run two commands, run the first one then the second one. to make that line press shift \
__________________
System: █۩█
CPU
E6400 @ 3.4GHz
Motherboard
DFI INFINITY P965-S
Memory
2GB G.Skill HZ
Graphics Card
XFX 7900GS 659MHz/2000MHz
Hard Drive
Raptor 74GB
Sound Card
X-FI
Power Supply
600Watt Modular w/120mm Fan
Case
Cooler Master Centerion
CPU cooling
Stock
GPU cooling
Zalman Fatal1ty FC-ZV9
OS
XP Pro x64
Monitor
Acer AL17

Last edited by kc-tr : 06-03-07 at 08:52 AM.
kc-tr is offline I fold for Overclock.net kc-tr's Gallery   Reply With Quote
Old 06-03-07   #8 (permalink)
Apple Doesn't Love You
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,985
Blog Entries: 1

Rep: 564 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

That would pipe the output of chown into find

Forget chown and find for a second. What I want to do is take the output of any unix function and put it in as an argument for the second
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 06-03-07   #9 (permalink)
Security Sleuth
 
kc-tr's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: root@big-brother:/$
Posts: 1,848

Rep: 119 kc-tr is acknowledged by manykc-tr is acknowledged by many
Unique Rep: 96
Folding Team Rank: 1317
Hardware Reviews: 1
Trader Rating: 8
Default

ahh ok, well its not designed that way however you can do it manually, by making a text document for example with commonly used commands save the ones you want and create a shell script out of it, however even that would require it being edited every time you used it.

the os itself is not designed that way because there are many instances where that will cause a problem or a syntax error.
__________________
System: █۩█
CPU
E6400 @ 3.4GHz
Motherboard
DFI INFINITY P965-S
Memory
2GB G.Skill HZ
Graphics Card
XFX 7900GS 659MHz/2000MHz
Hard Drive
Raptor 74GB
Sound Card
X-FI
Power Supply
600Watt Modular w/120mm Fan
Case
Cooler Master Centerion
CPU cooling
Stock
GPU cooling
Zalman Fatal1ty FC-ZV9
OS
XP Pro x64
Monitor
Acer AL17
kc-tr is offline I fold for Overclock.net kc-tr's Gallery   Reply With Quote
Old 06-03-07   #10 (permalink)
Apple Doesn't Love You
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,985
Blog Entries: 1

Rep: 564 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

I'm positive that there is a way to do this in unix.

I could easily make a script to do it with any command/arg number but I would rather use the system as it is now
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 08:16 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.35151 seconds with 8 queries