General :: Formatting $PS1 To X Amount Of Character?
Jun 22, 2011
I'm looking for a way to force my PS1 variable to a certain number of chars.
It currently looks like:
$PS1="W $"
and I'm trying to keep the same number of characters regardless of the length of current folder name.
For example, both Documents and bin would be displayed as 10 character strings, keeping the left side of my terminal the same width all of the time.
View 1 Replies
ADVERTISEMENT
Jun 12, 2011
I have just purchased a 2TB drive for my server and I was trying to get an idea of the differences between these file systems or other file systems out there. What is the amount of space after formatting for ext4, ext3, and ntfs?
View 4 Replies
View Related
Mar 27, 2010
1.What character instructd the shell to interpret a special character as an ordinary character?
2.What directory contains some of the utilities available on the system in the form of binary files?
3. What command is used to search the location of a utility?
4. What command is used to instruct the editor to write the file and quit the editor?
5. What key quits the more utility and displays the shell prompt?
6. What command starts a child shell as the super user, taking on root's identity and environment?
7. Which wildcard characters can be used for searching all the files in the system that start with "A"?
8. The user name or login name of the super user is????
[Code]....
View 10 Replies
View Related
Apr 9, 2011
How to get output of text file containing account number, debit amount, credit amount,date using shell script?
View 1 Replies
View Related
May 22, 2011
Does anyone know which distro does not need too much space.I have 4G and so far lubuntu and unbuntu both need 4 or more.
View 14 Replies
View Related
Jan 21, 2010
I would like to measure the amount of traffic my webcam is sending. What is the best way to do this? I tried iostat command, but i do not see the webcam traffic back.
View 1 Replies
View Related
Mar 8, 2011
Using Linux, when I boot I automatically have 16 16MB ramdisks, however, I would like to create one really large ramdisk to test some software.I found that I can adjust the size of the ramdisks already on the system with the kernel boot parameter ramdisk_size however, this makes all 16 ramdisks (/dev/ram0 - /dev/ram15) the size that is specified. So if I want to create a 1GB ramdisk, I would need 16GB of memory.Basically, I want to create one 10GB ramdisk which would be /dev/ram0. How would I go about doing that? I assume there is a kernel boot parameter, but I just haven't found it.
View 3 Replies
View Related
Aug 26, 2010
I have been having a lot of problems with disk errors and want to find a solution or more stable distro. I can not post the link yet since I am new but it is in the Ubuntu section of this forum and titled "Hibernate or spin down or hard shutdown causes errors." I am running Ubuntu 10.4 64bit on an AMD64 2.2gh.
I have been doing my research about distros and know a bit about what is going on with Linux. Sort of transcending past newbie I think. But I want to know what is the most stable distro for the least amount of Disk errors, or how to get ubuntu not to have so many errors. Maybe install the 32bit version? I want something fast and simple where I can run gimp/inkscape/openoffice/and maybe some of the video editing packages like Kino/piviti/cinerella.
View 4 Replies
View Related
Jun 12, 2011
I was messing around with the alternate character panel app and made a custom character set. I then wanted to put it on a new panel and created a new panel. I moved the character set to that panel, and then started to mess around with the panel settings (auto hide, show hide buttons, and expand, to be specific.) So far so good, until I moved the panel from the right side of the screen to the top. I already had a panel here, and it seemed not to like hiding a panel when there was already one on the top.
When the new panel hid itself, all my panels stopped responding (any clicks on them did nothing) and my processor started going at 100%. I tried a reboot and the only thing that changed is that now I can't even see my panels. I'm guessing I need to change the settings back manually through the prompt, but I don't know how to do that. I am using 10.04 and have not upgraded gnome since upgrading to 10.04.
View 1 Replies
View Related
Jun 25, 2010
We use a SLES 10 SP2 file server. This file server has all type of files. We want to know what is the amount of space used by mp3 files. What we need to know is the total space in disk of mp3 files. I've been testing du command, and find command, but with no satisfactory results. Does anybody know how to do this?
View 11 Replies
View Related
Sep 27, 2010
Code...
but 'top' shows 2GB of swap...
top - 18:38:42 up 4:22, 5 users, load average: 0.54, 0.61, 0.64
Tasks: 369 total, 1 running, 368 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.4%us, 1.4%sy, 0.0%ni, 86.9%id, 3.4%wa, 0.0%hi, 0.9%si, 0.0%st
Mem: 33265832k total, 24859468k used, 8406364k free, 379892k buffers
Swap: 2031608k total, 0k used, 2031608k free, 2030328k cached
Why is that?
View 6 Replies
View Related
Jul 15, 2010
Possibly related to this previous question, I would like to be able to run a task for a specified amount of time, then stop/kill it, then start it again. Specifically, I run the Folding@Home application on my Linux workstation. Periodically, it will have trouble logging-in to the home server, and will sit idle for a long time, but not release memory/resources it has claimed (yes, I realize this is likely a bug in the tool, but I can't fix that currently). Typically just the act of killing and starting the tool will allow it to check-in again. So, I would like to be able to run something like:
run_for <time> ./fah6
Does such a tool exist, or should I write a wrapper than nukes the fah6 client after, say, a week and restart it?
View 4 Replies
View Related
May 5, 2010
I have a first generation iPod Shuffle (yes, I know it's old) with 512 megabytes of space (feel free to laugh). I also have arch linux installed on my computer, with a music folder containing about 30 folders full of music. This totals to about 2 gigabytes of music.
What I want to do is: create a script that moves no more than 512 megabytes (it can be slightly under this amount, but NOT over) of random songs from my music folder (and it's subsequent artist/album folders) to a separate folder. I will then use gtkpod to move those random songs in the new folder to my iPod Shuffle.
View 6 Replies
View Related
Mar 11, 2010
I am connected to a network via SHH. Now, i know how i can see which users are logged on as well, but how can i see how many times each user has connected? this refering to users that have logged on at least once
View 7 Replies
View Related
Mar 7, 2011
I have an command to read inputs from file2 and replace the content in file1. Issue is that the op is coming in a single line as gsub and split functions don't recognize new line characters.
Code:
awk 'NR==FNR{gsub(/input./,""); split($0,a," = ");b[a[1]]=a[2];next} {gsub(/@/,"");for (i in b) gsub(i,b[i])}1' $t2 $t3
This gives belwo op:
[Code]....
View 14 Replies
View Related
May 16, 2011
I want to find all users shown in the /home/ directory whose disk consumption is more than 500MB. The following command works as expected.
cd /home/ && du */ -hs
68K ajay/
902M john/
250M websites/
From the above example, only 902M john/ should be returned.
How can I make the find command output the same results?
View 4 Replies
View Related
Aug 5, 2011
These following ext3 partitions contain identical data. As we can see, the larger the partition size, the more space is required for the same files:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop11 3965777 561064 3199964 15% [...]
/dev/loop19 573029 543843 29186 95% [...]
[code]....
View 2 Replies
View Related
Jan 9, 2011
I've been asked to move data from an old external hard drive to a new one, and to make the new one compatible with the Macintosh. (The old drive's USB connection has died, and I'm connecting to old the drive using a PC card that provieds an eSATA to the drive. The recipient's Macintosh doesn't have a PC card slot, so she can't access the old drive anymore. Hence, the new drive.)
Naturally, I'm doing this data transfer using Linux. I've discovered that I can format the drive as HFS+ using mkfs.hfsplus from the hfsprogs package. But I need to know: do I need to do anything special with the partition table? Is there a special Macintosh partition table format that I need to format this disk to? If so, what tools can I use to get the right format for the partition table?
View 1 Replies
View Related
Jun 11, 2011
I bought a 3 TB western digital but I cannot format it. I have to split into 2TB and 1TB (or less because it holds 2.73 TB actually). Is that normal because of linux does not support 3tb yet? I note that I tried into EXT4 and JFS (after tabel creating)
View 1 Replies
View Related
Apr 30, 2010
I have a 4 Gb memory stick which used to have OpenSuse on it but I don't use OpenSuse and wanted to use the stick for something else - for backing up my Mozilla Thunderbird installation. I thought that by re-formatting the stick, using a file obtainable from the HP web site, in connection with installing Linux on a memory stick, that it would leave me with an empty one but it hasn't; there is still a lot of OpenSuse stuff on it. How can I "empty" it so that I can use it to transfer my Ubuntu Thunderbird to another computer which is also running Ubuntu. I was going to open a terminal and type:
sudo cp -avr /home/chris/.thunderbird/ /media/disk
I have already tried this but it didn't appear to work, so is this not the right way to go about it?
View 4 Replies
View Related
Jun 29, 2011
I have created one partition. Now I want to extend that partition without formatting it.
View 3 Replies
View Related
Mar 14, 2010
How do I, in Ubuntu, determine what the formatting (e.g FAT etc.) of an SD card is?
View 2 Replies
View Related
Apr 2, 2010
I tried to format my harddisk (160 GB) with the following command
dd if=/dev/zero of=/dev/sda
After some 3 hours, following error came up:
dd: writing to '/dev/sda' : No space left on device
312581809+0 records in
312581808+0 records out
160041885696 bytes (160 GB) copied, 10708.3 s, 14.9 MB/s
View 2 Replies
View Related
May 6, 2010
I would like to change the formatting on my BASH prompt from this:
anon@machinename.domain.poo:~/some/very/annoying/long/path$
to something like this:
anon@machinename.domain.poo:~/some/very/annoying/long/path
$
The idea is that I would be able to type a reasonably long command on one line without it wrapping to the next line so quickly.
View 2 Replies
View Related
Sep 19, 2010
I installed openSuSE 11.3. By default, man pages blocks are justified (block-aligned). Example:
Code:
WARNING Improper use of this command may seriously damage your system,so read this manual carefully to understand how to use it correctly and prevent yourself from destroying your system. Instead, I would like all manual pages would be displayed left-aligned, like this:
Code:
WARNING Improper use of this command may seriously damage your system, so read this manual carefully to understand how to use it correctly and prevent yourself from destroying your system.
I definitely would not like to reformat all the manual pages one-by-one. but rather just changing sometnihg in some macro-definition file or something similar? .. Is it possible achieve that simply and quickly?
View 15 Replies
View Related
Jan 22, 2011
I have only known about Linux software for the past couple of weeks. I want to install Ubuntu 10.10 on an older desktop I have so I can become more familiar with it. I am average in knowladge about Windows OS and MS-DOS. I tried to install Ubuntu and I get an error message about the harddrive. The CD I am booting with will load on my other PC with Windows XP on it. I have only let it run on it long enough to verify that it is bootable.
I have made a floppy boot disc following the instructions on another Linux site about Ubuntu. I have also tried to boot my alternate PC with the floppy and it boots up. The harddrive on my working PC is a Maxtor 40gb formatted with NTFS file system. The harddrive in the older desktop is a Western Digital 80GB WD800LB-55DNA0.It worked fine with Windows XP on it. I also made a Western Digital DATA Lifeguard for DOS floppy and it boots with it.
View 14 Replies
View Related
May 1, 2010
I don't want sympathy, but merely explain what I'm up against. I'm 63 years old. I'm on medical and mental disability (Cognitive failure, the beginning of Alzheimer's). I used to be a good computer tech, but now, because of my memory problems, I don't remember how to do a lot of things with a computer.I'm seeking assistance (not 24/7 help or hand-holding)to help me reformat,partition, and set-up a dual-boot for both WIN 2000 Pro and Ubuntu Linux to operate programs where I can use my Amateur (Ham) Radio in digital modes (PSK-31, PSK-64, BPSK, cw, etc). I'm choosing NOT to run Ham Radio DeLuxe, as it's bloated with M$ "code" and could be hacked and messed with.
The hard drive is a Maxtor 80 gig (78 g formatted). I have another drive,a Western Digital 40 gig (37 g formatted) that I use for Windows as well, but mostly it contains Excel spreadsheets with Part 90 - Public Safety frequency information for the local (within 250 miles) from my home. It's a FAT 32 and I'd like the 80 gig to match that
View 3 Replies
View Related
Apr 12, 2010
How can I change the label of one partition on linux without formatting it.
It wll format the partition, and all content disappears.
View 5 Replies
View Related
Sep 27, 2010
I'm writing a script that gives me some pertinent info about my servers, and the last little piece I need to figure out is the process list. There are going to be non-technical people looking at the output of the script and I'm trying to make it as simple as possible.
Right now, if I do ps -ef | grep <process> | grep -v grep
It obviously shows me the process, but the problem is that there is 4 lines of info in front of the process. ie
root PID date time java -1024 -cp oh,my,god,there,is,so,much,data,it,carries,on,for,4,lines,I,want,to,shoot,myself,trying,to,read,it,f inally,in,the,end,there,is,a,space /here/is/the/process
I'd like the output to be something like this:
PID: #### Process: /here/is/the/process
I've thought about how I could take the output and use awk or sed but I know there is probably an easier way to do it with perl.
View 12 Replies
View Related
Apr 18, 2010
I have a 16GB memorystick which used to have a Linux partition. It therefore has two partitions; 2GB FAT32 and 14GB linux boot drive. The linux part stopped working, so I decided to reinstall it. But windows can't see that partition. I tried formatting the whole disk, but I can only format one partition (the FAT32). There seems to be no way to combine the two partitions into one big one, and there seems to be no way for windows to partition the large part of the memorystick to but Linux on it. In the windows partition manager, windows sees the large unused partition, and it let me delete it. But once I have deleted it, I'm not allowed to format it. Also I cannot delete or resize the small partition. I have a memorystick with two partitons. Windows only sees one of them, and won't let me use the other one. I would like to combine the two partitions so I can install Linux on the memory stick again.
View 3 Replies
View Related