General :: Showing Section In Files That Have Different Names?
Mar 3, 2010
I am running a bash script and I would like a command that will show me what differs from some files with similar names so I can delete them. Or if you can provide some info on how to complete my script. Here is my code:
#!/bin/bash
pwd=SOURCE
#Add extension into the name
[code]...
View 1 Replies
ADVERTISEMENT
Sep 17, 2009
Im trying to compare two files and I only want to display the user names that are in the first file and not the second.
So I have one file named final.txt (which contains every user name and only the user names in a list no other information)
Then I have another file Over1.txt (which only contains certain users that have different permissions This file is also setup differently with the user name and some information about the user after the user name.
I need a way to compare final.txt to over1.txt so that I will only display the names that are in final.txt but not Over1.txt
Ive tried using diff and comm but just cant seem to get it two work correctly. Im not sure if im missing a option or what.
View 5 Replies
View Related
Jul 22, 2011
how to find total size of all files whose names starting with a
OS: SunOS
du -h a* is giving individual file sizes.
View 6 Replies
View Related
Jul 8, 2010
You maybe know that VirtualBox has an "immutable" feature for HDD images. I.e. setup the system, if the stuff is in place, you can set the image to IMMUTABLE to prevent any changes to the image. Differences are written to a separated image. So on the next boot you'll see that all the (unintended) changes are gone and the "old" system is up & running again. I run an old SuSE 10.3 on a write-protected SD-IDE-Adapter. Changing and playing with RPMs is a mess due to around 50 changes I had to do to make that work. Is there any option to mount an SD-card as RO and having all the changes written to e.g. /dev/sda3? To make it clear: I thought about something like a RAID-X system, but could not find any description on how to setup a raidtab.
View 3 Replies
View Related
Jul 2, 2010
Code:
cp -r aa123.h aa*.h
results in
Code:
cp: target `aa456.h' is not a directory
Yes I read man page cp (1p). There is something written there about it, I couldn't understand though.
View 7 Replies
View Related
Apr 4, 2011
Write a short script that tells you whether the permissions for two files, whose names are given as arguments to the script, are identical. If the permissions for the two files are identical, output the common permission field. Otherwise, output each filename followed by its permission field
View 5 Replies
View Related
Jan 29, 2011
I have a bunch of files on a Ubuntu box, which have various characters in their filenames that Windows doesn't accept (mostly ":" and "*", but possibly others).What's the simplest way to get these all renamed and moved to a Windows machine? It's OK to replace these characters with something like "[colon]" and "[asterisk]".
View 1 Replies
View Related
Jun 1, 2010
i have install vsftp and gftp on ubuntu.when i want to connect to remote user(host3.v6.ground.station) with gftp, i gives this message and does not show any file of remote user.-----
gFTP comes with ABSOLUTELY NO WARRANTY; for details, see the COPYING file. This is free software, and you are welcome to redistribute it under certain conditions; for details, see the COPYING file
Looking up host3.v6.ground.station
Trying host3.v6.ground.station:21
Connected to host3.v6.ground.station:21
code....
View 1 Replies
View Related
May 22, 2010
while using history command i can able to see only last twenty histroy commands.
View 1 Replies
View Related
Jan 31, 2010
I need to replace ":" from multiple files names, since I am going to copy those files from a linux partition, which admit the ":" to a FAT32 partition, which does not.
Example:
original name: eg06_ana_21-05-06_09:21:03.JPG
wished name: eg06_ana_21-05-06_09-21-03.JPG
I have googled a lot but I have not been able to adapt the examples given by people to my aim.
It seems that rename command is what I should use, but I have no idea to build the correct pearl expression.
View 3 Replies
View Related
May 11, 2011
I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.
Should I be looking to concatenate the files into one file with the file names included, and then print them?
something like: -printfunction -printername < file*
View 7 Replies
View Related
Jun 25, 2010
Is there any command apart from ls command in Rhel that could display names of files alone in particular folder ?
View 7 Replies
View Related
Jun 1, 2011
I am having problems seeing files and folder names using Nautilus, but they are there as I can access them using CLI commands. Is there a way to get Nautilus to update its database or whatever it uses? I am using Nautilus 2.32.2.1. As is shown in my signature I am using F14 and Gnome 2.32.0.
View 7 Replies
View Related
Jul 15, 2011
I have a bash file as following:
Code:
#!/bin/sh
deal_file(){
printf $1
[code]....
so the for loop spilt the file names if containing spaces, how can I fix the bug?
View 6 Replies
View Related
Apr 18, 2011
When I try to connect a projector to my laptop (already running) and hit the fn+f7 (the designated button for switching screen), nothing happens. I see "no source found" on projector screen and my laptop screen works perfectly. Now if I restart the laptop with the projector connected, I see all the intial booting messages on the projector screen (not on my laptop), then the gnome login screen appears on both the projector screen and laptop (when the login screen appears on laptop it looks like it has lower resolution than my usual laptop resolution). But immediately after I log in, my laptop screen goes blank, and projector screen becomes the only active screen.
If I restart without the projector, again all normal operation on laptop screen is restored.
I feel like I am missing some very silly options. Any help is appreciated.
Here is the output of xrandr when the laptop is connected:
Code:
View 3 Replies
View Related
Nov 11, 2010
i recently restarted my computer so i baked up all my files to my external terabite restarted my computer pluged in my 2 drives and formated the wrong one DAMB so i lost every file i ever downloaded DAMB i used photorec to get it all back but all my files have system names eg f12223/f12224 etc but when i load the files to media player the correct name i displayed in the media player so is there a program i can get that will rename all the files on my drive with the names the have in propertys
View 2 Replies
View Related
Jul 6, 2011
So let's say I entered some dir in MC as a regular user and there is a file with very long name which is not convenient to spell and I want to edit it with nano as root. In this directory I type in a command "sudo nano [name]" and autocompletion doesn't work because the TAB key is for another purpose in MC. Can I insert a name of selected file without typing it in MC?
View 3 Replies
View Related
Nov 7, 2010
I am trying to write a loop to open four main-data-files. At each open of the main-data-file, I want the loop to open another four sub-files and split the data from the mail-data-file according to the creteria and dump into the four files. When the loop goes to the second main-data-file, it shall generate another 4 sub-files with different file name. And the process goes on. That means I will have total of 16 sub files for the four main-data-files. Each four files from the 16 files shall have specific name on it. Based on the code which I given below, I would say when the file at UNIT=100 is opened, 4 new files needed to be opened as well. They are:
maximum_dist_001_064.dat
maximum_dist_065_128.dat
maximum_dist_129_192.dat
maximum_dist_193_256.dat
View 1 Replies
View Related
Apr 1, 2011
*I'm using Ubuntu 10.10
My issue is I can't handle the files with spaces in their name, I've donde the below script to print each file found inside folder and subbfolders with "find".
I would like to "ls" to each file found with its complete path and with its basename too.
Code:
files=$(find . -type f)
for each in "$files"
do
ls -l "$each" # 1rst option I've tried to list with full path
ls -l "$(/bin/echo "$each")" # 2nd option I've tried to list with full path
ls -l "$(/bin/echo $(basename "$each"))" # 1nd option I've tried to list with it basename
[Code].....
How can I list "ls -l" in both cases (with full path and with basename) when there are files with spaces in their name?
View 6 Replies
View Related
Feb 7, 2010
I'm about to move a lot of folders from an older computer (sarge/etch) over to a newer with Lenny. But I get problems when I reach folders or files with names that contains nordic letters like øå. I'm using an external drive to move the folders. What is the easiest and best way to do this.
View 1 Replies
View Related
Nov 17, 2009
has anyone used some software tool for copying a file from one location to another (I mean local files - for example from one folder to another), which prompts if you already have this file, or a similar one...I'm going to use it for my file archive ... mostly for my MP3For example, I might have the folder /home/user/MP3/Heavy Metal/Old/Downloaded/Metallicabut have forgotten that I already have Metallica in this folder and now I want to copy my new music collection to my archive folder which contains for example this folder:MP3/Rock/MetAllicA-Full-DiscographyI need copy files software which will tell me:"You already have folder with similar name to 'MetAllicA-Full-Discography' called 'Metallica', do you want to skip this folder, or copy it to location 'MP3/Heavy Metal/Old/Downloaded/'?"This way I will reduce the file redundancy in my file archive, or at least will keep similar items close to each other ..
View 5 Replies
View Related
May 15, 2011
ffmpegthumbnailer is not working on files with spaces in their names. If i rename the file with no spaces then it creates a thumbnail with no problem.
View 4 Replies
View Related
May 24, 2011
I need to know file names in torrent without opening torrent client. Know and extract for further actions.
View 2 Replies
View Related
Jan 6, 2009
Is there a way to customize bash autocomplete such that it avoids searching for commands? I want it to auto complete file and folder names only!
View 2 Replies
View Related
Feb 28, 2011
I am using CentOS 5.5 64 bit.
My work requires me to have a lot of postscript files. Hence i have elaborate names for easy identification. For example --- AP-1_Jul-Ctrl-noEqSA_bg25C_precip,U250-150_xy.ps. I am unable to open them using evince. I get a blank evince screen with loading written on it. The same file named as 1.ps opens in a jiffy. As of now evince quickly opens pdf files with long names. But i would not like to convert ps to pdf.
Even kghostview does not open these long-named files.
View 14 Replies
View Related
Oct 26, 2010
I have a file like this:
I would like to remove a section between [first] and [second]:
Is almost what I want. I would like the section header to say in place.
Desired output:
View 3 Replies
View Related
Nov 27, 2010
In this part of logwatch:
Code:
--------------------- httpd Begin ------------------------
0.12 MB transferred in 11 responses (1xx 0, 2xx 8, 3xx 0, 4xx 3, 5xx 0)
[code]....
View 2 Replies
View Related
Aug 12, 2011
nested loop in ''Bash-Scripting in Linux'' ?What's wrong with my code:
for x in `seq 0.75 0.01 0.95`
do
for y in `seq 0.20 0.01 0.40`
[code]....
View 1 Replies
View Related
Oct 2, 2009
i want to make a script that change the names of files and folders into small letter because they are all in capital and more than 1000 fileit is impossible to do that with my hand
View 14 Replies
View Related
Mar 26, 2011
shell script to convert file names from UPPERCASE to lowercase file names or vice versa in linux
View 6 Replies
View Related