LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-08-2013, 05:53 AM   #1
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Rep: Reputation: Disabled
What does the - before the filename mean in setfacl --set-file ?


For example, to copy the ACL from one file to another, the command is getfacl notes | setfacl --set-file=- notes2.

Why is there a need for the - after the = sign ?

I tried it without the -, and I got "No such file or directory" ..

Additionally, I googled and there seems to be a -f option for setfacl, but the man page doesn't state it. Anybody can shed light on this well ? Thanks alot
 
Old 08-08-2013, 06:00 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
The dash tells setfacl to read from standard input, which is needed due to the pipe used.

From the setfacl man page:
Quote:
- If the file name parameter is a single dash, setfacl reads a list of files from standard input.
Quote:
Originally Posted by Grtyop
Additionally, I googled and there seems to be a -f option for setfacl, but the man page doesn't state it. Anybody can shed light on this well ?
Maybe that option is only available in new(er) versions of setfacl. It isn't present in mine either (Debian Squeeze):
Code:
$ setfacl -v
setfacl 2.2.49
 
1 members found this post helpful.
Old 08-08-2013, 06:05 AM   #3
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Original Poster
Rep: Reputation: Disabled
Holy, I totally missed that line in the man page.. My bad. Kudos.

Oh I see, thanks alot. In any case, I spotted the -f option here.
 
  


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
[SOLVED] Sed – how do I save output to file with filename from content of another file? misarab Programming 4 02-28-2011 02:12 PM
file permissions using setfacl dsirrine Linux - General 1 12-17-2009 05:10 PM
Change name of backup file in ext3 from filename~ to .filename~ Libu Linux - General 2 07-21-2008 09:29 PM
setfacl - how to set files to be saved as a particular user:group? neocontrol Linux - Security 2 03-12-2008 08:39 PM
What is a file like filename.1.2.3? Tavassoli Linux - Software 1 06-15-2006 07:30 AM

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

All times are GMT -5. The time now is 11:24 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration