General :: Find Will Go Through The Content Of Tarball As Well And List All Content
Oct 5, 2010
I am using find to search for .tgz files modified more than 7 days ago and delete them.find /directory/ -iname backup*.tgz -daystart -mtime +7 -exec rm -rf {} My problem is that find will go through the content of tarball as well and list all content. I want to only search main tarball and delete it if older than 7 days.
If you have the value 100 in File1 and the value 5 in File2, how do you write a script to divide the 100 in File1 by the 5 in File2 in Linux Bash Shell?The operating system I am using is Ubuntu 10 and object is to write a script to accomplish this task.
how to find the latest modified directory. I know that the command 'ls -rtl' gives the latest modified file/directory at the end. But my specific requirement is: If I create two directories named dir1, dir2 in the same order. so now my latest modified directory is "dir2". Now inside each directories, I created a file. Now in the last, I modify the file in "dir1". So overall, the content of dir1 got modified recently. If I use the command 'ls -rtl', this will still show dir2 as latest, as it is created recently. But I want the directory in which any internal content at any sub-hierarchy modified recently. so with what linux command I'll get this latest modified directory (dir1)?
I have the following command that I run on cygwin:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | xargs du --max-depth=0 > foldersizesreport.csv
I intended to do the following with this command: for each folder under /d/tmp/ that was modified in last 150 days, check its total size including files within it and report it to file foldersizesreport.csv however that is now not good enough for me, as it turns out inside each
so as you see inside each subfolderX there is a file named somefile.properties inside it there is a property SOMEPROPKEY=3808612800100 (among other properties) this is the time in millisecond, i need to change the command so that instead of -mtime -150 it will include in the whole calculation only subfolderX that has a file inside them somefile.properties where the SOMEPROPKEY=3808612800100 is the time in millisecond in future, if the value SOMEPROPKEY=23948948 is in past then dont at all include the folderin the foldersizesreport.csv because its not relevant to me.so the result report should be looking like:
and if subfolder3 had a SOMEPROPKEY=34243234 (time in ms in past) then it would not be in that csv file.so basically I'm looking for:
find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | <only subfolders that have in them property in file SOMEPROPKEY=28374874827 - time in ms in future and not in past | xargs du --max-depth=0 > foldersizesreport.csv
After installing numerous stuff on my Slackware system, I notice I am running out of hard-drive space. I see that /tmp/SBo has about 1G of staff that I recently installed --- may I safely delete this staff?
i am using rhel5 and i just wanted to see the contents of the initrd image. I have copied that from /boot/grub and saved in /tmp directory. Then i did the following
when i gave that, it says "mount: you must specify the filesystem type" Then i included "-t ext2" option in the mount command. Now it says,
mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so
Then i created a ext2 filesystem and did the same thing. But there is no difference.
In Iran there is a famous "access denied page" that redirects you to a strange page with a lot of HTML errors and lol, telling you RTFM about ridiculous Internet laws.I want to filter the contents of the page, because the page IP, URL, ... are all unknown.I don't know much about squid configuration scripts.I can read but cannot write
I'm developing some small application runs on tomcat 6This web application just query data from MySQLBut I'm concern about performanceHow can I check how many request It can serve as well ?I'm thinking about to change the application to runs on httpd (will write in PHP)Normally, how many request httpd can handle for simple database query ?
i had installed alfresco 3.4 server .previously we are working with alfreso version 1 .how i can moved the database content of alfresco 1 version content in alfresco 3.4 content.whether i had to migrate mysql of 3.1 directly to 3.4 alfresco server are else i had to just put the content in alf_data content store and content deleted table alone is enough .
We copied the directories/files from one filesys1 to filesys2 and since that initial copy have further added more directories/files to filesys2 from another source. How can we compare filesys1 to filesys2 to make sure all files/directories were copied successfully to filesys2? I would like a way to check filesys1 against filesys2 and only show/output when something is missing from filesys2 that exists in filesys1 and not report the additional/extra directroies/files that have been copied to filesys2.
Show me the content of your linux live cd running linux with it. (The thing is we are using a live USB, is it possible with a usb, how to do it, otherwise I tell everyone to burn a live CD, if it is possible with a live CD and not with a USB (= normally not loaded in bios in windows usb = plug&play).
I am new to linux and wget...what would be the syntax to use wget to move content from one local directory to an svn repository (svn commit)? For instance if i have a directory c:\dir1, and i want to move it's content onto an SVN repo...is this possible using wget? If so, how do I get this done?
I have two folders such as nonserved/ folder1/ folder2/
And a served folder via Apache media/ js/ css/ img/
In the end, I want to include/append contents of /nonserved to /media so that [URL] will be as such: /media /js /css /img /folder1 /folder2
I am running Ubuntu Server, I am up for either apache config or symbolic link based answer :) Plus nonserved folder is rather dynamic thus manual symbolic linking to each folder is impossible.
I've been using an old Fortigate-60 at home for the kids for some time but now the license is expired again. Are there any free or inexpensive alternatives? I'd like something I can run on a linux firewall and share against multiple users, with different profiles. In the past I ran squid and I whitelisted sites each kid was allowed to use but this becomes tedious as the kids get older and need access to more. I'd love something that could check a website rating or category list, let the user through for certain categories, and block bad or unrated sites. I don't really need virus checking or email scanning or the like.
I'm aware that there are no Bluray players for Linux but I'm wondering if it's possible to play Full 3D HD (1080p, Side-By-Side) MKV files (or Bluray BDMV folders, etc).
Full 3D HD files are actually two 1080p frames "side-by-side" so the effective resolution is 3840x1200. In order to play these properly the software needs to switch to TV into 3D mode (or however HDMI 1.4a works).
I don't think simply playing the 3840x1200 resolution file will work so are there any options out there?
i want to move all files inside the folder moving to folder public_html which command i should use? m using centos5 64bit tell me full command which i should writer in ssh client..so my all files will be moved to public_html...from moving folder.
I am calling a URL from shell script and passing few argumants,Here i have to pass file content as one argument.How can i pass file content through URL.
eg: content=`cat /Users/test1.txt` open http://localhost:8080?filecontent=$content
I have huge files, wherein some lines begin with a number. I want to convert that number to a bookmark link
Sample file:
Code:
C.S. Lewis (I think) wrote:
1 If war is ever 2 legal, then peace 3 is sometimes 4 sinful.
Text without numbers toom I need the numbers to be <a name tags where the id is the letter x and the number that is at the beginning of the line:
Code:
C.S. Lewis (I think) wrote: <a name="x1">1</a> If war is ever <a name="x2">2</a> legal, then peace <a name="x3">3</a> is sometimes <a name="x4">4</a> sinful.
Text without numbers too I'm not sure why I can't get this, but after hours of 3 line long seds and endless while read lines, grepping ^[[:digits:]]s I can't figure it out.