I am trying to use the command gzip to compress a directory or file list as argument and compress the file in a file named copia101225, within a directory named ZIPFILES. I want to make sure that if the arguments doesn't exist, the destination directory doesn't exist that it creates it. I keep failing at compressing the file to copia101225, that is within the directory named ZIPFILES This is what I have so far:
#! / bin / bash # Title: Compress a file # Author: Jose Miguel Colella # Description: Compress a file
I have a really elaborate website project and I'd like to check in all the code to an SVN repository WITHOUT checking in all the jpg, pdf, sql, .mobi files, etc. I have subclipse installed on my local machine as part of Eclipse, but downloading the entire site and doing it file-by-file would take a very long time.
1) check in certain file types in a directory (e.g, /home/foo/public_html) while excluding certain file types (e.g., *.jpg, *.pdf, etc.) and subdirectories (e.g. exclude home/foo/public_html/images) in that directory.
2) I need to specify that this initial checking of my entire project goes into the /trunk folder in my SVN repository -- and not the root, not 'branch' subdir, etc. Also, I need the directory structure of my files to be preserved. that is to say i don't want /includes/conf/config.php to be at the root of my trunk folder in my repository.
3) I need to specify a comment that is applied to all of the files I'm checking in. E.g., "this is the initial checkin dated 12/24/2009, happy holidays!"
How would I limit this to searching for the text 'SomeString' or 'SomeOtherString', but only if the file has extension .php, .inc or .js? Also - what piping to xargs does here? I don't understand how this command actually works.
I have a requirement to list files using find command My folder contains below list of files with out extention.I have a requirement to exclude only ABC.123.* type files and list others. Even though files having MNO contains this pattern i should not exclude. Even if file ends with .txt or .doc it should not be excluded. That is ABC.123.1234.txt should not be excluded.But I am not getting what is required. Can any one please let me know if I am doing wrong any where. As per my requirement I cannot use grep, -regex, or -regex attributes to find command.
its a very basic question but iam not getting it right nowi have to list all the pdf files on my desktop even the pdf files which are present in folders on the desktopls *.pdfonly list the files present on the desktop, but not the files in the folders on the desktop containing the pdf files.
suppose in my current directory, I have 50 sub-directories. Now, I am interested only in about 20 of those sub-directories (whose names match a pattern). I would like to recursively list the contents of these 20 sub-directories. How do I do that ? I would like to do this in Solaris 10 and Linux(RHEL 5.x).
I'm trying to make a shell script that will list the 50 newest files in a directory with several subdirectories in. I've been trying with the find-command with no luck and now I've figured I should probably use ls. The problem is when I do "ls -lRt | head -50" it will do 1 directory at the time. It will not first make the full list and then sort it. This will display all items in first directory, sorted, then the newest directory will be sorted and displayed. So I figured I have to sort the whole process of ls before I limit the head. So this is where I am at now: ls -lRt | sort <something clever here> | head -50
Only doing a "|sort|" will sort it by name if I understand it right and I don't know how to solve it. Here's also my first attempt if that is of any interrest or help, this was limited by the change status time of files (so some lists got very large). These lists dit not get sorted by time and I could not find any way to do so.find $ftpDir -ctime $time -type f -print > $ftpFileLsAny help on this would be appreciated since I'm sort of stuck now. After reading manuals for all the options I can think of and still there's just a big blur in my head..
In the out.zip i can see two directories (dir1 and dir2) but want only these two files (file1.txt and file2.txt) were in the root of out.zip! I thought the "-D" option is what I need, but it doesn't work
Let:Source directory is /x/y/z/src: Destination is /x/y/z/dst, Q: What is the option in zip command, which zip all updated or new picture files (*.jpg) from the source path to the destination + don't keep the original files -zipping while moving- ?
I am running Ubuntu Netbook Remix 10.04. I have been having some problems recently with Pulseaudio, which has traditionally worked fine for me on this netbook actually. Specifically, when I boot the computer, the system will play the "Bongo roll" sound at the GNOME login screen, telling me that sound hardware has been detected and should be working fine.
Yet when I log into the Netbook interface, my volume notification icon has the three blank lines indicating my session does not have access to the sound hardware. Nor do any of the built-in Sound preference panels detect my hardware, only registering dummy output. Finally, the (hopefully) deprecated PulseAudio Device Manager and Volume Control applications also fail to detect my hardware.
However, this problem is inconsistent! It will only happen on certain boots, though the number seems to be hovering around 75% of boots where pulseaduio fails to load correctly. The daemon/service is running, and restarting it only returns:
jmmcl2@unteer:~$ sudo service pulseaudio restart PulseAudio configured for per-user sessions ask again, why is my Pulseaudio being so selective about detecting my sound hardware in Ubuntu 10.04?
I have a newly built Redhat 5.5 box. When connecting over VPN and executing either "ls -al" or "df -h", the command prompt hangs without returning any output. Have got same result with TeraTerm and Putty clients. However, other commands run fine. Also,local users are able to run "ls -al" or "df -h" successfully.Storage is local disk. Any idea what could be mis-configured.
I've got a Fedora 10 server with a simple read-only samba share.I'm able to mount and browse the share from a Fedora 12 client, but all directories appear as empty--and I can see on the server that they contain many files. This happens whether I browse using smbclient, or mount using mount.cifs.I've got smb/nmb ports enabled on both the client and server. File permissions on the server look right.The server smb.conf setup:
I think as a result of a script that started duplicating files in a loop, the allotted capacity on my VPS filled up with multiple nested copies of the same files... After a reboot, I could delete most of them, but got rm stalled in certain directories...
after isolating which ones, I found this: a directory listing that lists the files, and at the same time tells me they are not there!!!
Code: ls ls: cannot access userkey.php: No such file or directory ls: cannot access workshop.php: No such file or directory ls: cannot access quiz.php: No such file or directory ls: cannot access webservice_rest.php: No such file or directory
If I runls -R1I get a recursive listing of all files under the current directory.However, if I dols -R1 *.avi, ie I want to search only for files with the file descriptor .avi, I get an errorQuote:ls: cannot access *.avi:No such file or directorySo it seems I am using ls incorrectly. What's the correct way to use wild card pattern matching when using the -R switch? Or maybe that isn't possible?
I'm using rsync to create a mirror of the data files on our main server every day. I've looked at the man page, and can't see it; can I get a listing of the files that have been changed on or added to the mirror when it's completed? Can it just log what it's doing to a file?
Firefox opens file listing instead of Nautilus opening file listing.When I access a folder via "Places" -> "Home Folder" or "Places" -> "Downloads", Firefox opens and list the contents of the directory.I have re-installed Nautilus, un-installed Firefox and then going to "Places" -> "Home Folder" or "Places" -> "Downloads" launches Nautilus and I can view the contents normally. Anybody else had this problem with Firefox ? Anybody know how to fix this Firefox problem ?Running Ubuntu Desktop 9.10 64bit.
is it possible to write a script, when prompted in the terminal to output a tree listing of files and folder with out using a tree command.for example. control the output of ls -l to output that list like a tree (-- or /-)
I have a set of folders in some directory /home/dir, and I'd like to generate zip files for the contents of each folder separately. I'm wondering if there's a quick way to do this with a one-liner, or what the bash script would be.
Directory structure: /home/dir/first/second/thirdand I want three files, first.zip, second.zip, and third.zip. I know zip isn't the best format, but these are for distribution to users on Windows machines and I'd prefer to keep them in the zip format.
I have one profile on my Ubuntu machine that I want to eliminate the gnome panel from. When I use the gconf-editor I can change the panel key but it has no effect on my profile. If I set the key as the default it kills the panel on all my other profiles but not on the one I set it from. Anyone have any bright ideas on this?
I suppose I could just auto hide the one left offending panel but I truly wanted to get rid of it entirely. It is irritating having it pop up when I get near the edge of the screen constantly.
I am running Fedora 10 and Win XP SP2 on an Intel PIII machine and couple of weeks ago there was a short on the motherboard. In the result 1 out of 4 USB ports died, 2 show over current change ad 1 seems to work properly. In XP I could disable a "USB adapter" in Device Manager, which removed 3 usb's from the system, but the remaining one, equipped with the hub, works fine. Is there a way to do something like that in Fedora?
Here is the USB section from my lspci -vv:
00:04.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 11) (prog-if 00 [UHCI]) Subsystem: First International Computer, Inc. VA-502 Mainboard
While using school internet, occasionally I cannot connect to their wireless at all. I know it is definitely the school's doing, under both Windows and Linux, my computer is denied connection for about 30 minutes, then it suddenly works. I always have the same address, but setting a static address does not allow me connection either. Everyone else has no problem connecting, so I am pretty sure the school denied my computer connection.
How can I workaround this? Changing my card's MAC address does not fix the problem. Is there another way to discriminate users?
I have a Sony Vaio with built-in WiFi. I deemed the built-in WiFi to be flaky, so I installed a WiFi PC Card.bOpenSUSE 11.2 stock GNOME install out of the box, is there a way to disable just the flaky WiFi interface with Network Manager? It seems I can disable all WiFi or enable all WiFi but not individual interfaces selectively. If I connect to my router, the flaky interface wants to act as the dominant interface and makes my connection slow and unreliable.
I hate to make comparisons with Windows, but it's very obvious how to do it there. Is this something I can do with Network Manager or in GNOME? Or is this something deeper, changing configuration files with a text editor or recompiling kernel?
I presume that if this is possible it would need to be done as root (or as a user who shares root's UID of 0).How can a process be launched so that it does not show up in a ps aux or ps ef or top listing if the command is run by non-root?Is this even possible?The distributions I typically run are RHEL/CentOS and Ubuntu - so if there is a distro-specific answer, that's ok, too.