General :: Using Cut On File Full Of Ls -l Output To Display Only Filenames?
Oct 7, 2010
I have a file that contains "ls -la" output. I would like to display only the filenames, none of the other information before it such as permissions, ownership, size, and date.Would the cut command be the best way to hit this, or should I use Vim or sed?
View 6 Replies
ADVERTISEMENT
Jul 27, 2010
I use 'grep -Ri "mypattern" .' to search for all files in the current directory recursively that contain "mypattern". But this command returns every single occurence, so that if a given file has several occurences of the pattern, the screen fills up pretty quick. More than likely, there's a way to restrict the output so that it only displays each file once, no matter how many occurences it contains, but I couldn't find how to do it.
View 2 Replies
View Related
May 14, 2011
I made a few data DVD's in OS/X 10.6.7 on my Macbook, using Burn URL...with the option "burn for PC and Mac".To my surprise when I load the DVD's in my ubuntu netbook, Unity displays the filenames abbreviated and renamed [COLOR="Navy"][U]. Some of the original filenames are similar, but unity restricts the filenames to about 22 ~ 50 characters.As such, I can't get a true (correct) file listing of the DVD's contents in Natty. I don't recall this happening with Karmic. Is this some problem with Nautilus?
FWIW, these were done using double layer 8.5 DVD-R disks. However, I did NOT select overburning, so the contents fit well into the allowed capacity, to permit inclusion of any hidden files.As soon as I load the disks on my Mac, I am able to see the full filename.
View 7 Replies
View Related
Feb 25, 2010
i have a problem with ps, and pgrep when used in a script. with the -A option it does not print all processes and pgrep on a known running process returns nothing. So I made a script with nothing but "ps -A" and the shebang and it does show all of them. Also, ps -A on the command line is showing all processes. I am running this script as root and it is owned by root.edit: I have ps -A in a function called in a case and if I put ps -A outside the function and case it shows all. how is where it's at changing it's output
View 2 Replies
View Related
May 18, 2010
Suppose I have a variable called filename which contains the name of a file but the name does not contain an extension.
View 4 Replies
View Related
Feb 8, 2011
I am trying to use awk command in perl. Below is my awk comamnd which works alone.
awk '{Easttot=Easttot+$1} END {print Easttot}' MessagesProcessedEAST2Cnts.dat
I would like to use this awk's output in shell script. I am using system command like below to get the out put. But it is not working.
$Output = system("awk '{Easttot=Easttot+$1} END {print Easttot}' MessagesProcessedEAST2Cnts.dat'");
View 3 Replies
View Related
Feb 4, 2011
Though I have little experience in the past, i just can't get to work what i have in mind.i want to display part of an output stream.
cat sample.xml
<packet or="recv" ljid="d.sample@test.local/" ts="20110204T15:02:55"><message from='j.sample2@test.local/' to='d.sample@test.local' type='chat' xml:lang='en' id='sd61'>
[code]...
View 4 Replies
View Related
Jun 16, 2011
Is it possible to get WGET to only show download progress e.g. download bar, opposed to all of the connection info, as it does look a little ugly on the client side, is this possible to do?
View 2 Replies
View Related
Jul 29, 2010
My script is not diaplying output as it contains awk while iterating over the array. My script is as follows:
shortcodes=( "56882" "58585" "58888" "57575" "57677" );
for shortcode in ${shortcodes[@]}
do
echo "`awk -F"|" '/ShortCode=tel:$shortcode/ { arr[substr($2,1,4)]++ } END { for( no in arr) { print no , arr[no] } }'
[code]....
View 4 Replies
View Related
Dec 15, 2009
I am new to this forum. I am a both rhel5 and fedora user.I can not configure my Samsung syncmaster 632nw monitor to display full screen at 1360X768.There is huge blank space on left and right portion of the monitor.The maximun resolution is 1024*768 and minimum is 640*480.
I have tried many times to solve it using xorg.conf but still unable to do it.
Here is xorg.conf's content :
View 5 Replies
View Related
Dec 1, 2009
I got a filename called like this:
beach---------20090808-110000.ogg
beach---------20090808-120000.ogg
It's like this:
name----------YYYYMMDD-hhmmss.ogg
Now Im splitting these hourly files into 1 minute files. I get then this output sofar properly:
beach---------20090808-110000_00.mp3
beach---------20090808-110000_01.mp3
beach---------20090808-110000_02.mp3
and so on....
the 00, 01, 02 and up are the minutes it has splitted it. Now I need a script, after it did this, to rename the file names into this:
beach---------20090808-110000.mp3
beach---------20090808-110100.mp3
beach---------20090808-110200.mp3
beach---------20090808-110300.mp3
View 4 Replies
View Related
Apr 23, 2010
Consider a situation in which you want to display only specific lines of contents from a file or of a command's output. Yes, we have head and tail commands. But, how to view all the lines of a file except the last one or vise versa when we don't know the count of lines in advance?
Consider this output:
Code:
[root@localhost ~]# ps au | grep bash
root 6316 0.0 0.0 4672 1440 tty1 Ss+ Apr22 0:02 -bash
root 20847 0.2 0.0 4672 1432 pts/0 Ss Apr23 0:12 -bash
root 21167 0.0 0.0 3920 660 pts/0 S+ 01:00 0:00 grep bash
Here, I don't want the last line (in italic) to be included in the result since the last line is due to "grep bash" in the devised command "ps au | grep bash". Well, we can rewrite the devised command:
Quote:
"ps au | grep bash | head -n 2"
But, again, here we are specifying the count of lines to be included. But, in the presented problem we don't know any count in advance!
View 6 Replies
View Related
Feb 22, 2011
The video projector I have to use this week projects an image too large for its screen and spills over on every side.
Fixing the physical setup is not possible or at least unlikely for the moment: the only solution is to carefully resize and position windows so that they display in the visible part of the screen - using full-screen mode is out.
Is there a way around this via software, using xrandr for example?
# xrandr doesn't have a padding option...xrandr --output VGA1 --mode 1360x768 --left-of LVDS1 --padding 200
View 1 Replies
View Related
Jul 24, 2010
I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:
3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---
[code]...
View 14 Replies
View Related
Feb 5, 2010
I am using below script to ftp a file to remote machine
Code:
#!/bin/bash
ftp -nv <<EOF
open ${SERVER}
[code]....
When I execute the above file its working fine and displaying output on to the screen. How can I log the output to a file?
View 7 Replies
View Related
Aug 4, 2010
I'm currently running Testing/Sid on my machine with Fluxbox as my window manager.Yesterday I noticed that I was not getting full output from commands using lxterminal.First off I tried another terminal,which was the xfce4-terminal.The result being exactly the same,missing output.I have also tried re-generating my xorg.conf,and yes you guessed it no change.Getting desperate I also tried dpkg-reconfigure console-setup,still missing output from lxterminal.So to sum up why do I get the full output with xterm but not lxterminal which I have been using previously for some time.
View 5 Replies
View Related
Feb 4, 2010
What are the possible problem when Windows access the file from Ubuntu got Read Only even though have a full permission to read, write and execute the file? Ubuntu to Ubuntu accessing the file there is no problem only Windows got a problem.
View 1 Replies
View Related
Aug 3, 2010
having following problem in linux environment.I have a following basic file with name " BASEFILE", as shown example below :
sl.no pol.no name status loan
1 123 rama FORCE 500
2 234 jama LAPSE 800
[code]...
View 12 Replies
View Related
Feb 5, 2010
Is there a way to NOT display the current full directory path in the terminal? I'd like to set the default to be just the current directory instead of everything back to ~.
View 2 Replies
View Related
Dec 26, 2010
How can I get the full path to display in Nautilus so I can copy it to the clipboard and/or type a path manually?
View 7 Replies
View Related
Oct 5, 2010
I am a final year student doign Computer systems engineering and just been introduced to linux. While still strugling to catch up with the commands, I am now given an assignment under shell scripting.I seriously am strugling to understand this question, can you please assist me.Here follows the assignment:
Operating Systems III
Some tips
e.g. (test if a file is empty, if it is then display "file is empty" otherwise display
[code]....
View 10 Replies
View Related
Jan 8, 2010
I want to encrypt Full partition instead of creating a file and encrypting it, and also want to move this disk to another server. do i need some files also (that hold keys) with my self on new server. i am using FC11.
View 2 Replies
View Related
Oct 17, 2010
i was just wondering, that, is there a way to permanently display a full folder in desktop, in gnome.for example, there is a home folder displayed in kubuntu desktop, always
View 6 Replies
View Related
Aug 1, 2011
Is there a way to display and edit the full path of the current directory in nautilus? I am using Ubuntu 10.10 and I think it was possible with an older version.
View 3 Replies
View Related
Nov 2, 2009
have a doubt, suppose in the script i include an exe type of file for ex. ./a.out, which takes input as a pdb file namely 1sn3.pdb, now i want my output text file to contain the name 1sn3.txt , how do i do that using the shell script
View 8 Replies
View Related
Nov 26, 2010
I'm trying to manipulate a large text file full of records (metadata - one complete record per line). I need to delete every line on which certain words appear - there are five different words, all pretty simple all-caps strings with occasional whitespace. I tried using grep -v, which worked a treat, but only string-by-string. Ideally I'd like to run this as grep -v -f, where the file targeted by the -f contains the strings I need to match in order to delete the lines they're in.
i.e. grep -v -f filecontainingSTRINGS.txt targetfile.txt > outputfile.txt
When I try this, however, I don't get any matches - or more specifically, no changes are made in the output file. It works fine if there's only one string in filecontainingSTRINGS, but it doesn't work if there's more than one (I'm using newline as the delimiter). (Also my machine doesn't recognise /usr/xpg4/bin/grep - no idea what that's all about!)
View 5 Replies
View Related
Apr 4, 2011
I have the following problem: syslog is constantly writing to disk, because the kernel spams these messages
Code:
Apr 4 14:14:56 aspire kernel: [138498.252610] display port opened
Apr 4 14:14:56 aspire kernel: [138498.299755] display port closed
Apr 4 14:14:57 aspire kernel: [138499.328206] display port opened
Apr 4 14:14:57 aspire kernel: [138499.371835] display port closed
Apr 4 14:14:58 aspire kernel: [138500.452671] display port opened
[Code]...
View 1 Replies
View Related
Feb 26, 2010
Mobo - Asus M4A78T-E
CPU - Phenom II X4 955
RAM - DDR3 1333 dualchannel 8G
Display - Samsung 2494
Debian 504 64bit
Where can I download respective drivers. Linux drivers coming with the mobo can't work. There is no driver for Linux on the CD coming with the display. Fonts becomes very large even selecting "8". The screen can't expand to the full size of the display.
View 2 Replies
View Related
Sep 26, 2010
I know that you can make it full screen, however it just makes the background OS's background black, and still provides a smaller display. Is it possible to make the guest OS's screen (or display) full size?
View 6 Replies
View Related
Oct 27, 2010
I know how to display contents at the end of beginning of a file or even at specific lines but how to you display a file from line # to the end of the file?
View 5 Replies
View Related