General :: Exclude Does Not Work With Tar Command

Jul 6, 2011

I don't know why --exclude doesn't work when I use tar command. Please see this code
Code:
mahmood@pc:~$ l a/
1.txt 2.txt 3.txt b/
mahmood@pc:~$ tar cvjf compressed.tar.bz2 --exclude=/home/mahmood/a/b/ a/
a/
a/2.txt
a/1.txt
a/3.txt
a/b/
mahmood@pc:~$
As you can see although I excluded b/ but tar command ignored that.

View 2 Replies


ADVERTISEMENT

General :: Use Exclude Option In"rm" Command To Exclude Some Files/folders?

Feb 3, 2010

i have created on folder in my server to upload some regular states. I want that user can modify or upload already stored files. but, should not upload any unwanted files orfolders.for that i want to use "rm" command as auto scheduler (putting this in cron tab.so that all files will be removed except some required files / folders for which this upload facility is activated. users are using secure-shell for uploading data.

View 1 Replies View Related

General :: Exclude Dir From Find Command

Feb 5, 2011

i have this find command to find modified files and copy them.Code:find $SRC_DIR -type f -ctime -1|xargs -i cp --parents {} $BACKUP_DIR/$DAY/and it works good but it want to exclude files that exist in some folders like $SRC_DIR/cash and $SRC_DIR/woks/tmp

View 3 Replies View Related

General :: 'find' Command Regex To Exclude Hidden Files?

Jun 28, 2010

I have the following command which finds all files that have changed in the last day and lists them. How can I exclude hidden files like .bash_history?

View 3 Replies View Related

Ubuntu :: Exclude File From Terminal Command?

Jul 12, 2010

Well i downloaded a program with many .deb files ( At least 15 ) so i wanna execute them all trough the terminal so i typed

Code:
patowlmc@patowlmc-desktop:~$ cd /home/patowlmc/Downloads/i386
patowlmc@patowlmc-desktop:~/Downloads/i386$ sudo dpkg -i *.deb
Readme.deb: command not found

As you can see all files in the folder are .deb packages, but one: The Readme file, wich is a text file.

I know I just have to move the file to somewhere else, and everything should work, but i wanna know if there's a command for excluding a file or something.

P.D. I totally trust the program, so don't worry about so many .deb files.

View 9 Replies View Related

Ubuntu Security :: GRsync --Exclude Command Syntax / Backup A Whole Startup Disk To Another?

Jul 19, 2010

I'm trying to backup a whole startup disk to another with GRSYNC but I don't need some files or directories. For example, I don't want to backup my 'swapfile1' (I do not have a dedicated swap partition) or the 'media' directory' in order to no enter a looping sync.I've searched the web for the correct syntax of the --exclude command but none have worked if applied in the advanced option "before" rsync starts. These a sample of NOT workin syntaxes:

exclude /media or -- exclude 'media' or -- exclude "media"

same for swapfile1:

exclude swapfile1 or -- exclude 'swapfile1' or -- exclude "swapfile1"

View 7 Replies View Related

General :: How To Exclude Last Several Characters?

Aug 17, 2010

any tips from you guys on how to filter my awk output?I want to exclude last 5 characters using awk in my tcpdump result.I don't want to include ".443:" in my tcpdump using awk.

View 6 Replies View Related

General :: How To Exclude Sub Directories From ZIP CLI

Jul 22, 2010

I'm trying to create backup/archive my Ubuntu 10.04 system files (so I can restore it in case my system get corrupted). More specifically, I'm trying to zip the important files in my root directory not including my home directory (which includes my documents which I backup separately/more frequently) to an external hard drive attached via USB (called 'My Book').Since File Roller didn't give me quite the level of control I was looking for, I created a script that I could execute to backup and archive regularly.

View 1 Replies View Related

General :: Exclude NFS In Find

Jan 20, 2010

I want to search files excluding the NFS find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions also.Is there any way to exclude the NFS only...

View 7 Replies View Related

General :: Rsync - Exclude-from Qns ?

Jan 8, 2011

I'm trying to do a sync of the root home directory to a folder call backup and excluding some files.

This is wat i executed:

rsync -a /root/ --exclude-from '/root/rules.txt' /root/backup/

My rules.txt is as below:

- anaconda-ks.cfg

Somehow it doesnt read the rules.txt and it will always include the anaconda-ks.cfg file.

View 3 Replies View Related

General :: Can Grep Exclude Symlinks?

Oct 15, 2010

I tried to run one grep that excludes symlinks and pipe it into a second that searches for my pattern but I continue to get the recursive directory loop error. As a result (I think) my grep is incomplete as the search just loops between directories symlinked together.

View 7 Replies View Related

General :: How To Exclude Multiple Directories

May 10, 2011

I am trying to exclude multiple directories when using tar. I can do it for just one directory with exclude= directory.I can also do it for multiple directories by typing that code again and again.As you can see im trying to call this variable that has endless amounts of directories in it seperated by a space.. but when run it doesnt work! It will however work if i just put one directory in the variable. Any ideas?

View 2 Replies View Related

General :: Tar File With Exclude A Directory?

Mar 2, 2010

[ --exclude FILE ] [ -X, --exclude-from FILEI tar to tar some directory and exclude a directory , I tried tar -cvf /tmp/test.gz ./* --exclude ./temp but not work , and the parameter --exclude seems exclude file only not directory , can advise what can i do

View 1 Replies View Related

General :: Include And Exclude In Rsync

May 26, 2011

I'm trying to copy files from my local directory to a remote site using rsync.I want to include in the copy all the java files and exclude all the .svn directories, but I can't do it.

View 4 Replies View Related

General :: Using Find To Exclude Some Files

Dec 7, 2010

I'm trying to find all java files in bash that contains the method "assign()".I would like to retrieve the same list except without the Test* files. How can I do that?

View 3 Replies View Related

General :: Exclude Rsync Excludes From Delete?

Jul 9, 2010

im using rsync to sync files across multiple machines.

using the following:

rsync -az -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
--delete --delete-excluded --force --exclude=.git --exclude=.bundle
--exclude=tmp --exclude=log/* --exclude=*.log --exclude=*.pid
user@host:/path/to/src/ /var/build/dest

I want to exclude all log files from being transferred from the src to dest and delete all existing ones on the destination so im using --exclude=*.log with --delete-excluded which works great ...

but i want to keep a certain log file intact on the destination. I want a --exclude-from-delete option

Is this possible with rsync?

View 1 Replies View Related

General :: Restore A Tar File And Exclude A Directory?

Jan 25, 2010

I am trying to restore a tar file that contains a directory I cannot nor want to restore. How can I explicitly state the name of the directory? command I am using:tar -xzvPXf <tar file name>.tgz exclude-file=<directory>I have tried it with the exclude-file before the tar file name and same results. No restore.

View 3 Replies View Related

General :: How To Exclude Multiple Directories In Awk With Find?

May 20, 2010

I found a script on webmaster world that mostly does what I need it to, but have been making modifications to tailor it to my specific needs.I know that //..*/ tells awk to ignore hidden directories, how do I define more directories to ignore? (i.e. temp, var, etc)? I've tried playing with prune before the awk command with limited success...I know that there are many ways to do the same thing and keep running into brick walls.

View 11 Replies View Related

General :: Format A Harddisk Into JFS And Exclude All Bad Clusters That Are Defect?

Jun 3, 2010

I have tried mkfs.jfs but well not working.... The hardisk is bit getting old ...

I have tried gparted but it doesnt do that.

View 4 Replies View Related

General :: Midnight Commander - Exclude Some Directories / Patterns When Doing Search

Apr 7, 2011

In Midnight Commander, is it possible to exclude some directories/patterns/... when doing search? (M-?) I'm specifically interested in skipping the .hg subdirectory.

View 1 Replies View Related

General :: Does The SVN Command Work In One Directory But Not Another?

Jun 10, 2011

I used SVN to check out the code of an open source project. When I typed the following command:

[user1@smallfox]~/workspace/project1% svn co http://svn.apache.org/repos/asf/mahout/trunk

It worked just fine. However, when I typed the SVN command in the root directory, it did not work and gave me an error message:

[user1@smallfox]~% svn co http://svn.apache.org/repos/asf/mahout/trunk
zsh: command not found: svn

View 1 Replies View Related

General :: Apt-Get Install Command Does Not Work

Aug 11, 2010

I use the 10.04 ubuntu, somehow I did something and now the apt-get install command doesn't work. No matter what package I try to download, there's always a "couldn't download all packages run update or --fix...." message. When I scroll up I see that it downloaded some packages but it couldn't find them all. So I thought that I should try a different server. I googled it and found that the server's address is stored in /etc/apt/sources.list. I edited that file and replaced all the deb and deb-src lines with the server's address. I saved that but when I tried to download something (like vlc) I got a "E: Couldn't find package vlc" message. I also tried many different server's but there was no difference. Am I doing it wrong? Should I run a command after editing the /etc/apt/sources. list file? Or didn't I edited the file right?

View 4 Replies View Related

General :: Running This Command, And Seems Not To Work?

Jun 3, 2011

I'm running this command, and seems not to work, following the command:Quote:for nic in `ls /sys/class/net | grep -v lo`; do echo ${nic}; udevinfo -a -p /class/net/{nic} | grep -i address; doneThe output is the following:Quote:eth0eth1But the output should show something like this: (showing the MAC address)uote:

View 6 Replies View Related

General :: Unable To Get The Ls Command To Work Exactly

Jun 15, 2011

I am have trouble getting the ls command to work exactly how I want, for example, sometimes I want to list the contents of a directory into a text file by command:

Code:
ls directory > list.txt

(assume the only objects the directory contains are files with extension .dat eg file1.dat, file2.dat, ...)sometimes I want the relative path of the files prepended to them in my text file eg:

path/file1.dat
path/file2.dat
path/file3.dat

[Code].....

It feels like ls is unpredictable in this regard - sometimes it prepends the path and sometimes it doesn't and sometimes it adds both entries (with and without the path prepended into the text file)....How can better control the way ls works?

View 2 Replies View Related

General :: Can't Get Mail Command (or Equivalent) To Work

Feb 19, 2011

I am teaching using an Ubuntu 10 server. The course stipulates the students use the mail command to send me assessment work, however I can't get mail to work (I did have to install it in the first place). After I end the message with a dot I get the message "send-mail: cannot open mail:25".

View 7 Replies View Related

General :: -cd Command Of Urxvt Doesn't Work

Aug 13, 2010

-cd command of urxvt doesn't work

View 1 Replies View Related

General :: Locate Command - Unable To Work

Oct 5, 2010

Code:

nnjond@nnjond-den:/$ cd /media/disk/Dual_Data/
nnjond@nnjond-den:/media/disk/Dual_Data$ ls
07_Magna_DOWNLOADS 21_TEMPS Peleas.htm
08_Self-Improvement 22_Desktop Pelleas.odt

[code]....

View 6 Replies View Related

General :: Setup Command Not Work In RHEL 5.4?

Sep 26, 2010

i am using rhel 5.4..today i type the command setup! is not workERRor: error while loading shared libraries: libslang.so.2: cannot open shared object file: No such file or directory

View 5 Replies View Related

General :: Sudo Command Doesn't Work

Oct 17, 2010

I want to install some software using sudo apt-get command,but it dosen't work.(my network works well) how to handle it? below is the output of terminal:

@ubuntu:~/Downloads$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4
Reading package lists... Done
Building dependency tree

[Code].....

View 4 Replies View Related

General :: VI Command Mode - Aliases Only Work In RHEL4

Jul 1, 2009

When in command mode one can come out of the file temporarily by Code: :sh in command mode. When I find myself on the shell on RH 9 the aliases dont work but in RHEL 4 all aliases work like charm. Does anyone know why is it so?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved