LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-24-2023, 12:13 PM   #1
lfshunna
LQ Newbie
 
Registered: Aug 2023
Posts: 1

Rep: Reputation: 0
tar file problem in lfs


why am i getting this error what is the solution for this i am really a newbie to lfs i watched and tried the kernotex videos i watched on the internet but i got stuck in 5 chapters 5.2. Binutils-2.40 - Pass 1 given error like Try 'tar --help' or 'tar --usage' for more information.
lfs:/mnt/lfs/sources$ tar - zvf '/mnt/lfs/sources/util-linux-2.38.1.tar.xz'
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.

Try 'tar --help' or 'tar --usage' for more information.
lfs:/mnt/lfs/sources$ tar - zvf '/mnt/lfs/sources/util-linux-2.38.1.tar.xz'
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.
lfs:/mnt/lfs/sources$

sorry for this silly question i just wanted to understand lfs why am i getting this error
 
Old 08-24-2023, 03:49 PM   #2
fedoralinuxjunkie
Member
 
Registered: Jun 2008
Location: NC
Distribution: Slackware64 15.0
Posts: 154

Rep: Reputation: 21
Hey there,

Are you trying to extract the archive? If so, you need to change the command to
Code:
tar -xvf '/mnt/lfs/sources/util-linux-2.38.1.tar.xz'
to extract it. You could also run it without the "-" like this:
Code:
tar xvf '/mnt/lfs/sources/util-linux-2.38.1.tar.xz'
& it will work just as well. What's happening here is as follows: The x option tells tar to extract the archive. The v option tells tar to print the filename currently being extracted (or being put into a tar archive) to the console. The f option specifies the filename that tar needs to work with, & is used when both extracting & creating tar archives. The z option shouldn't be necessary here being I think it only applies when creating a tar archive (the z option runs the archive through the gzip compressor). Hopefully this clears things up for you.
 
1 members found this post helpful.
  


Reply



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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
[SOLVED] LFS 7.3--> tar xf lfs-bootscripts-20130123.tar.bz2 , bash : tar : command not found AkiraMizuki Linux From Scratch 3 06-01-2013 03:00 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
How do I un tar a .tar, .tar.z, .tar.gz file vofkid Linux - Newbie 4 03-15-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:55 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
Open Source Consulting | Domain Registration